diff --git a/core/rtw_cmd.c b/core/rtw_cmd.c index 0cf3c2d..8e34ca1 100755 --- a/core/rtw_cmd.c +++ b/core/rtw_cmd.c @@ -611,12 +611,7 @@ u8 rtw_sitesurvey_cmd(struct adapter *padapter, NDIS_802_11_SSID *ssid, int ssi pmlmepriv->scan_start_time = rtw_get_current_time(); -#ifdef CONFIG_STA_MODE_SCAN_UNDER_AP_MODE - if((padapter->pbuddy_adapter->mlmeextpriv.mlmext_info.state&0x03) == WIFI_FW_AP_STATE) - _set_timer(&pmlmepriv->scan_to_timer, SURVEY_TO * ( padapter->mlmeextpriv.max_chan_nums + ( padapter->mlmeextpriv.max_chan_nums / RTW_SCAN_NUM_OF_CH ) * RTW_STAY_AP_CH_MILLISECOND ) + 1000 ); - else -#endif /* CONFIG_STA_MODE_SCAN_UNDER_AP_MODE */ - _set_timer(&pmlmepriv->scan_to_timer, SCANNING_TIMEOUT); + _set_timer(&pmlmepriv->scan_to_timer, SCANNING_TIMEOUT); rtw_led_control(padapter, LED_CTL_SITE_SURVEY); @@ -624,9 +619,6 @@ u8 rtw_sitesurvey_cmd(struct adapter *padapter, NDIS_802_11_SSID *ssid, int ssi } else { _clr_fwstate_(pmlmepriv, _FW_UNDER_SURVEY); } - -; - return res; } diff --git a/core/rtw_mlme_ext.c b/core/rtw_mlme_ext.c index 3d77e23..ab1a2dd 100755 --- a/core/rtw_mlme_ext.c +++ b/core/rtw_mlme_ext.c @@ -8113,25 +8113,6 @@ void site_survey(struct adapter *padapter) SelectChannel(padapter, survey_channel); } -#ifdef CONFIG_STA_MODE_SCAN_UNDER_AP_MODE - if( stay_buddy_ch == 1 ) - { - val8 = 0; /* survey done */ - rtw_hal_set_hwreg(padapter, HW_VAR_MLME_SITESURVEY, (u8 *)(&val8)); - - if(check_buddy_mlmeinfo_state(padapter, WIFI_FW_AP_STATE) && - check_buddy_fwstate(padapter, _FW_LINKED)) - { - update_beacon(padapter->pbuddy_adapter, 0, NULL, true); - } - } - else if( stay_buddy_ch == 2 ) - { - val8 = 1; /* under site survey */ - rtw_hal_set_hwreg(padapter, HW_VAR_MLME_SITESURVEY, (u8 *)(&val8)); - } -#endif /* CONFIG_STA_MODE_SCAN_UNDER_AP_MODE */ - if(ScanType == SCAN_ACTIVE) /* obey the channel plan setting... */ { #ifdef CONFIG_P2P @@ -8164,14 +8145,7 @@ void site_survey(struct adapter *padapter) } } } - { -#ifdef CONFIG_STA_MODE_SCAN_UNDER_AP_MODE - if( stay_buddy_ch == 1 ) - set_survey_timer(pmlmeext, pmlmeext->chan_scan_time * RTW_STAY_AP_CH_MILLISECOND ); - else -#endif /* CONFIG_STA_MODE_SCAN_UNDER_AP_MODE */ - set_survey_timer(pmlmeext, pmlmeext->chan_scan_time); - } + set_survey_timer(pmlmeext, pmlmeext->chan_scan_time); } else { /* channel number is 0 or this channel is not valid. */ #ifdef CONFIG_P2P @@ -8206,11 +8180,6 @@ void site_survey(struct adapter *padapter) else #endif /* CONFIG_P2P */ { - -#ifdef CONFIG_STA_MODE_SCAN_UNDER_AP_MODE - pmlmeinfo->scan_cnt = 0; -#endif /* CONFIG_DMP_STA_NODE_SCAN_UNDER_AP_MODE */ - /* 20100721:Interrupt scan operation here. */ /* For SW antenna diversity before link, it needs to switch to another antenna and scan again. */ /* It compares the scan result and select beter one to do connection. */ @@ -9710,18 +9679,11 @@ void survey_timer_hdl(struct adapter *padapter) #endif /* issue rtw_sitesurvey_cmd */ - if (pmlmeext->sitesurvey_res.state > SCAN_START) - { + if (pmlmeext->sitesurvey_res.state > SCAN_START) { if(pmlmeext->sitesurvey_res.state == SCAN_PROCESS) - { -#ifdef CONFIG_STA_MODE_SCAN_UNDER_AP_MODE - if( padapter->mlmeextpriv.mlmext_info.scan_cnt != RTW_SCAN_NUM_OF_CH ) -#endif /* CONFIG_STA_MODE_SCAN_UNDER_AP_MODE */ - pmlmeext->sitesurvey_res.channel_idx++; - } + pmlmeext->sitesurvey_res.channel_idx++; - if(pmlmeext->scan_abort == true) - { + if(pmlmeext->scan_abort == true) { #ifdef CONFIG_P2P if(!rtw_p2p_chk_state(&padapter->wdinfo, P2P_STATE_NONE)) { diff --git a/include/rtw_mlme_ext.h b/include/rtw_mlme_ext.h index 4eeff80..89c3265 100755 --- a/include/rtw_mlme_ext.h +++ b/include/rtw_mlme_ext.h @@ -391,10 +391,6 @@ struct mlme_ext_info { struct HT_info_element HT_info; struct wlan_bssid_ex network;//join network or bss_network, if in ap mode, it is the same to cur_network.network struct FW_Sta_Info FW_sta_info[NUM_STA]; - -#ifdef CONFIG_STA_MODE_SCAN_UNDER_AP_MODE - u8 scan_cnt; -#endif //CONFIG_STA_MODE_SCAN_UNDER_AP_MODE }; // The channel information about this channel including joining, scanning, and power constraints.