예제 #1
0
/*----------------------------------------------------------------------------*/
VOID
timerInitialize (
    IN P_ADAPTER_T          prAdapter,
    IN PFN_TIMER_CALLBACK   prfnTimerHandler
    )
{
    ASSERT(prAdapter);
    ASSERT(prfnTimerHandler);

    LINK_INITIALIZE(&prAdapter->rTimerList);

#if CFG_USE_SW_ROOT_TIMER
    kalOsTimerInitialize(prAdapter->prGlueInfo, (PVOID)prfnTimerHandler);
#else
    nichtTimerInit(prAdapter, WLAN_ROOT_TIMER, prfnTimerHandler);

    NIC_SET_INT_EVENT(prAdapter, WLAN_ROOT_TIMER_INT);
#endif

    return;
} /* end of timerInitialize() */
예제 #2
0
/*----------------------------------------------------------------------------*/
VOID
scanFsmStep (
    IN P_ADAPTER_T          prAdapter,
    IN ENUM_SCAN_STATE_T    eNextState
    )
{
    P_SCAN_INFO_T prScanInfo;
    P_SCAN_STATUS_T prScanStatus;

    DEBUGFUNC("scanFsmStep");

    ASSERT(prAdapter);

    prScanInfo = &prAdapter->rScanInfo;
    prScanStatus = &prScanInfo->rScanStatus;


    DBGLOG(SCAN, STATE, ("TRANSITION: [%s] -> [%s]\n",
                         apucDebugScanState[prScanInfo->eCurrentState],
                         apucDebugScanState[eNextState]));

    prScanInfo->eCurrentState = eNextState;

    /* Do tasks of the State that we just entered */
    switch (prScanInfo->eCurrentState) {
    case SCAN_STATE_IDLE:
        /* Enable beacon timeout counter, which is disabled during scan */
        nicpmEnableTimeoutCounter(prAdapter);

        /* Set RX filter for not to receive beacon from different BSSID */
        NIC_UNSET_RX_FILTER(prAdapter, RXFILTER_RXDIFFBSSIDBCN);

        /* Set RX filter for not to receive probe response from different BSSID */
        NIC_UNSET_RX_FILTER(prAdapter, RXFILTER_RXDIFFBSSIDPRORESP);

#if CFG_WORKAROUND_HEC_5269
        /* Flush AC4 before set TX_DONE event */
        nicTxFlushStopQueues(prAdapter, TXQ_MGMT_MASK, 0x0 /*(UINT_8)NULL*/);

        /* Set TX_DONE event */
        NIC_SET_INT_EVENT(prAdapter, INT_EVENT_TX);
#endif

        nicHwScanConfigRestore(prAdapter,
                               &prScanInfo->rScanConfig,
                               prScanInfo->eCurrentHwScanMode);

        if (prScanInfo->eCurrentHwScanMode == ENUM_HW_SCAN_NORMAL_SCAN) {
            DBGLOG(SCAN, INFO, (">>ucLastScanChnlIdx = %d,  ucLastScanBandIdx = %d.\n",
                prScanStatus->ucLastScanChnlIdx, prScanStatus->ucLastScanBandIdx));

            nicHwScanGetLastScannedChnlFreq(
                prAdapter,
                &prScanStatus->ucLastScanChnlIdx,
                &prScanStatus->ucLastScanBandIdx);

            DBGLOG(SCAN, INFO, ("<<ucLastScanChnlIdx = %d,  ucLastScanBandIdx = %d.\n",
                prScanStatus->ucLastScanChnlIdx, prScanStatus->ucLastScanBandIdx));

            DBGLOG(SCAN, INFO, ("ucNumOfScanChnl = %d\n", prScanInfo->rScanConfig.ucNumOfScanChnl));
        }
        break;

    case SCAN_STATE_ACTIVE:
        break;

    default:
        ASSERT(0); /* Make sure we have handle all STATEs */
    }

    return;

}