/* ======================================================================== Routine Description: Inform us that a scan is got. Arguments: pAdCB - WLAN control block pointer Return Value: NONE Note: Call RT_CFG80211_SCANNING_INFORM, not CFG80211_Scaning ======================================================================== */ VOID CFG80211_Scaning( IN VOID *pAdCB, IN UINT32 BssIdx, IN UINT32 ChanId, IN UCHAR *pFrame, IN UINT32 FrameLen, IN INT32 RSSI) { #ifdef CONFIG_STA_SUPPORT PRTMP_ADAPTER pAd = (PRTMP_ADAPTER)pAdCB; VOID *pCfg80211_CB = pAd->pCfg80211_CB; BOOLEAN FlgIsNMode; UINT8 BW; if (!RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_INTERRUPT_IN_USE)) { MTWF_LOG(DBG_CAT_ALL, DBG_SUBCAT_ALL, DBG_LVL_ERROR, ("80211> Network is down!\n")); return; } if (!pCfg80211_CB) { MTWF_LOG(DBG_CAT_ALL, DBG_SUBCAT_ALL, DBG_LVL_ERROR, ("80211> pCfg80211_CB is invalid!\n")); return; } /* In connect function, we also need to report BSS information to cfg80211; Not only scan function. */ if ((!CFG80211DRV_OpsScanRunning(pAd)) && (pAd->cfg80211_ctrl.FlgCfg80211Connecting == FALSE)) { return; /* no scan is running from wpa_supplicant */ } /* init */ /* Note: Can not use local variable to do pChan */ if (WMODE_CAP_N(pAd->CommonCfg.PhyMode)) FlgIsNMode = TRUE; else FlgIsNMode = FALSE; if (pAd->CommonCfg.RegTransmitSetting.field.BW == BW_20) BW = 0; else BW = 1; CFG80211OS_Scaning(pCfg80211_CB, ChanId, pFrame, FrameLen, RSSI, FlgIsNMode, BW); #endif /* CONFIG_STA_SUPPORT */ }
/* ======================================================================== Routine Description: Inform us that a scan is got. Arguments: pAdCB - WLAN control block pointer Return Value: NONE Note: Call RT_CFG80211_SCANNING_INFORM, not CFG80211_Scaning ======================================================================== */ VOID CFG80211_Scaning( IN VOID *pAdCB, IN UINT32 BssIdx, IN UINT32 ChanId, IN UCHAR *pFrame, IN UINT32 FrameLen, IN INT32 RSSI) { #ifdef CONFIG_STA_SUPPORT PRTMP_ADAPTER pAd = (PRTMP_ADAPTER)pAdCB; VOID *pCfg80211_CB = pAd->pCfg80211_CB; BOOLEAN FlgIsNMode; UINT8 BW; CFG80211DBG(RT_DEBUG_ERROR, ("80211> CFG80211_Scaning ==>\n")); if (!RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_INTERRUPT_IN_USE)) { DBGPRINT(RT_DEBUG_TRACE, ("80211> Network is down!\n")); return; } /* End of if */ /* In connect function, we also need to report BSS information to cfg80211; Not only scan function. */ if ((pAd->FlgCfg80211Scanning == FALSE) && (pAd->FlgCfg80211Connecting == FALSE)) { return; /* no scan is running */ } /* End of if */ /* init */ /* Note: Can not use local variable to do pChan */ if (pAd->CommonCfg.PhyMode >= PHY_11ABGN_MIXED) FlgIsNMode = TRUE; else FlgIsNMode = FALSE; if (pAd->CommonCfg.RegTransmitSetting.field.BW == BW_20) BW = 0; else BW = 1; CFG80211OS_Scaning(pCfg80211_CB, &pAd->ScanTab.BssEntry[BssIdx].pCfg80211_Chan, ChanId, pFrame, FrameLen, RSSI, FlgIsNMode, BW); #endif /* CONFIG_STA_SUPPORT */ } /* End of CFG80211_Scaning */
/* ======================================================================== Routine Description: Inform us that a scan is got. Arguments: pAdCB - WLAN control block pointer Return Value: NONE Note: Call RT_CFG80211_SCANNING_INFORM, not CFG80211_Scaning ======================================================================== */ VOID CFG80211_Scaning( IN struct rtmp_adapter *pAd, IN uint32_t BssIdx, IN uint32_t ChanId, IN u8 *pFrame, IN uint32_t FrameLen, IN int32_t RSSI) { #ifdef CONFIG_STA_SUPPORT VOID *pCfg80211_CB = pAd->pCfg80211_CB; bool FlgIsNMode; UINT8 BW; if (!RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_INTERRUPT_IN_USE)) { DBGPRINT(RT_DEBUG_TRACE, ("80211> Network is down!\n")); return; } /* In connect function, we also need to report BSS information to cfg80211; Not only scan function. */ if ((!CFG80211DRV_OpsScanRunning(pAd)) && (pAd->cfg80211_ctrl.FlgCfg80211Connecting == false)) { return; /* no scan is running from wpa_supplicant */ } /* init */ /* Note: Can not use local variable to do pChan */ if (WMODE_CAP_N(pAd->CommonCfg.PhyMode)) FlgIsNMode = true; else FlgIsNMode = false; if (pAd->CommonCfg.RegTransmitSetting.field.BW == BW_20) BW = 0; else BW = 1; CFG80211OS_Scaning(pCfg80211_CB, ChanId, pFrame, FrameLen, RSSI, FlgIsNMode, BW); #endif /* CONFIG_STA_SUPPORT */ }