/*----------------------------------------------------------------------------*/ VOID timerUnInitialize ( IN P_ADAPTER_T prAdapter ) { ASSERT(prAdapter); LINK_INITIALIZE(&prAdapter->rTimerList); #if CFG_USE_SW_ROOT_TIMER /* <TODO> to reclaim the resource */ #else nichtCancelTimer(prAdapter, WLAN_ROOT_TIMER); NIC_UNSET_INT_EVENT(prAdapter, WLAN_ROOT_TIMER_INT); nichtKillTimer(prAdapter, WLAN_ROOT_TIMER); #endif return; } /* end of timerInitialize() */
/*----------------------------------------------------------------------------*/ __KAL_INLINE__ VOID scanFsmTransAction_IDLE_to_ACTIVE ( IN P_ADAPTER_T prAdapter ) { P_SCAN_INFO_T prScanInfo; P_SCAN_CONFIG_T prScanCfg; UINT_32 rStatus = WLAN_STATUS_SUCCESS; #if CFG_SUPPORT_802_11D P_CONNECTION_SETTINGS_T prConnSettings; #endif ASSERT(prAdapter); #if CFG_SUPPORT_802_11D prConnSettings = &prAdapter->rConnSettings; #endif prScanInfo = &prAdapter->rScanInfo; prScanCfg = &prScanInfo->rScanConfig; /* For the state transition from BG SSID scan to SCAN, scan done interrupt will be generated from the exit of BG SSID scan (LP own back). So clearing the scan done interrupt status is to prevent the confusion whether the scan done is generated by SCAN or BG SSID scan. */ NIC_RESET_INT_EVENT(prAdapter, INT_EVENT_SCAN_DONE); #if CFG_WORKAROUND_HEC_5269 /* Unset TX_DONE event */ NIC_UNSET_INT_EVENT(prAdapter, INT_EVENT_TX); #endif if (prScanCfg->ucNumOfPrbReq == 0) { if (prScanCfg->eScanType == SCAN_TYPE_ACTIVE_SCAN) { prScanCfg->eScanType = SCAN_TYPE_PASSIVE_SCAN; ASSERT(0); } } #if CFG_SUPPORT_802_11D /* Force to use Passive Scan if multi-domain function is enabled and * domain information is not available. * Only one scan dwell time is applied, which is combined min. and max. * scan dwell time. */ if (prConnSettings->fgMultiDomainCapabilityEnabled) { if (prAdapter->eConnectionState == MEDIA_STATE_DISCONNECTED) { prScanCfg->eScanType = SCAN_TYPE_PASSIVE_SCAN; prScanCfg->ucChnlDwellTimeMin += prScanCfg->ucChnlDwellTimeExt; prScanCfg->ucChnlDwellTimeExt = 0; } else { P_BSS_INFO_T prBssInfo = &prAdapter->rBssInfo; if (!prBssInfo->fgIsCountryInfoPresent) { prScanCfg->eScanType = SCAN_TYPE_PASSIVE_SCAN; prScanCfg->ucChnlDwellTimeMin += prScanCfg->ucChnlDwellTimeExt; prScanCfg->ucChnlDwellTimeExt = 0; } } } #endif /* Submit probe request frame(s) if Active Scan is applied */ if (prScanCfg->eScanType == SCAN_TYPE_ACTIVE_SCAN) { if ((rStatus = scanSendProbeReqFrames(prAdapter, prScanCfg->rSpecifiedSsid.aucSsid, prScanCfg->rSpecifiedSsid.u4SsidLen, prScanCfg->ucNumOfPrbReq, prScanCfg->ucNumOfSpecifiedSsidPrbReq)) != WLAN_STATUS_PENDING) { if(rStatus != WLAN_STATUS_SUCCESS) { ASSERT(0); } //error handling ? return; } } /* Configure HW scan parameters, which is through share memory input */ nicHwScanConfig(prAdapter, prScanCfg, prScanInfo->eCurrentHwScanMode); /* Disable beacon timeout counter during scan */ nicpmDisableTimeoutCounter(prAdapter); /* Set RX filter to receive beacon from different BSSID */ NIC_SET_RX_FILTER(prAdapter, RXFILTER_RXDIFFBSSIDBCN); /* Set RX filter to receive probe response from different BSSID */ NIC_SET_RX_FILTER(prAdapter, RXFILTER_RXDIFFBSSIDPRORESP); /* Enable HW scan */ nicHwScanEnable(prAdapter, prScanInfo->eCurrentHwScanMode); return; }