diff --git a/core/rtw_ioctl_set.c b/core/rtw_ioctl_set.c index 72c5417..35f3db0 100644 --- a/core/rtw_ioctl_set.c +++ b/core/rtw_ioctl_set.c @@ -102,40 +102,28 @@ _func_enter_; /* when set_ssid/set_bssid for rtw_do_join(), but scanning queue is empty */ /* we try to issue sitesurvey firstly */ - if (pmlmepriv->LinkDetectInfo.bBusyTraffic==false - #ifdef CONFIG_LAYER2_ROAMING - || pmlmepriv->to_roaming >0 - #endif - ) - { + if (pmlmepriv->LinkDetectInfo.bBusyTraffic==false || + pmlmepriv->to_roaming >0) { RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("rtw_do_join(): site survey if scanned_queue is empty\n.")); /* submit site_survey_cmd */ if (_SUCCESS!=(ret=rtw_sitesurvey_cmd(padapter, &pmlmepriv->assoc_ssid, 1, NULL, 0)) ) { pmlmepriv->to_join = false; RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("rtw_do_join(): site survey return error\n.")); } - } - else - { + } else { pmlmepriv->to_join = false; ret = _FAIL; } goto exit; - } - else - { + } else { int select_ret; _exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL); - if ((select_ret=rtw_select_and_join_from_scanned_queue(pmlmepriv))==_SUCCESS) - { + if ((select_ret=rtw_select_and_join_from_scanned_queue(pmlmepriv))==_SUCCESS) { pmlmepriv->to_join = false; _set_timer(&pmlmepriv->assoc_timer, MAX_JOIN_TIMEOUT); - } - else - { - if (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE)==true) - { + } else { + if (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE)==true) { /* submit createbss_cmd to change to a ADHOC_MASTER */ /* pmlmepriv->lock has been acquired by caller... */ @@ -171,19 +159,13 @@ _func_enter_; /* when set_ssid/set_bssid for rtw_do_join(), but there are no desired bss in scanning queue */ /* we try to issue sitesurvey firstly */ - if (pmlmepriv->LinkDetectInfo.bBusyTraffic==false - #ifdef CONFIG_LAYER2_ROAMING - || pmlmepriv->to_roaming >0 - #endif - ) - { + if (pmlmepriv->LinkDetectInfo.bBusyTraffic==false || + pmlmepriv->to_roaming >0) { if ( _SUCCESS!=(ret=rtw_sitesurvey_cmd(padapter, &pmlmepriv->assoc_ssid, 1, NULL, 0)) ){ pmlmepriv->to_join = false; RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("do_join(): site survey return error\n.")); } - } - else - { + } else { ret = _FAIL; pmlmepriv->to_join = false; } diff --git a/core/rtw_mlme.c b/core/rtw_mlme.c index 8bc7507..68c6cf6 100644 --- a/core/rtw_mlme.c +++ b/core/rtw_mlme.c @@ -1098,13 +1098,8 @@ _func_enter_; } else { - #ifdef CONFIG_LAYER2_ROAMING DBG_88E("try_to_join, but select scanning queue fail, to_roaming:%d\n", pmlmepriv->to_roaming); - #else - DBG_88E("try_to_join, but select scanning queue fail\n"); - #endif - #ifdef CONFIG_LAYER2_ROAMING if (pmlmepriv->to_roaming!=0) { if ( --pmlmepriv->to_roaming == 0 || _SUCCESS != rtw_sitesurvey_cmd(adapter, &pmlmepriv->assoc_ssid, 1, NULL, 0) @@ -1116,7 +1111,6 @@ _func_enter_; pmlmepriv->to_join = true; } } - #endif _clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING); } } @@ -1290,9 +1284,7 @@ _func_enter_; } - #ifdef CONFIG_LAYER2_ROAMING pmlmepriv->to_roaming=0; - #endif rtw_set_scan_deny(padapter, 3000); @@ -1322,17 +1314,11 @@ _func_enter_; _clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING|WIFI_UNDER_WPS); -#ifdef CONFIG_LAYER2_ROAMING if (pmlmepriv->to_roaming > 0) _clr_fwstate_(pmlmepriv, _FW_LINKED); -#endif - if (check_fwstate(&padapter->mlmepriv, _FW_LINKED) -#ifdef CONFIG_LAYER2_ROAMING - || (pmlmepriv->to_roaming<=0) -#endif - ) - { + if (check_fwstate(&padapter->mlmepriv, _FW_LINKED) || + (pmlmepriv->to_roaming<=0)) { rtw_os_indicate_disconnect(padapter); _clr_fwstate_(pmlmepriv, _FW_LINKED); @@ -1971,7 +1957,6 @@ _func_enter_; if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) ) { - #ifdef CONFIG_LAYER2_ROAMING if (pmlmepriv->to_roaming > 0) pmlmepriv->to_roaming--; /* this stadel_event is caused by roaming, decrease to_roaming */ else if (pmlmepriv->to_roaming ==0) @@ -1979,7 +1964,6 @@ _func_enter_; if (*((unsigned short *)(pstadel->rsvd)) != WLAN_REASON_EXPIRATION_CHK) pmlmepriv->to_roaming=0; /* don't roam */ - #endif /* CONFIG_LAYER2_ROAMING */ rtw_free_uc_swdec_pending_queue(adapter); @@ -1993,9 +1977,7 @@ _func_enter_; rtw_free_network_nolock(pmlmepriv, pwlan); } _exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL); - #ifdef CONFIG_LAYER2_ROAMING _rtw_roaming(adapter, tgt_network); - #endif /* CONFIG_LAYER2_ROAMING */ } @@ -2083,9 +2065,7 @@ void _rtw_join_timeout_handler (_adapter *adapter) { _irqL irqL; struct mlme_priv *pmlmepriv = &adapter->mlmepriv; -#ifdef CONFIG_LAYER2_ROAMING int do_join_r; -#endif /* CONFIG_LAYER2_ROAMING */ _func_enter_; @@ -2097,7 +2077,6 @@ _func_enter_; _enter_critical_bh(&pmlmepriv->lock, &irqL); - #ifdef CONFIG_LAYER2_ROAMING if (pmlmepriv->to_roaming>0) { /* join timeout caused by roaming */ while (1) { pmlmepriv->to_roaming--; @@ -2114,10 +2093,7 @@ _func_enter_; break; } } - - } else - #endif - { + } else { rtw_indicate_disconnect(adapter); free_scanqueue(pmlmepriv);/* */ } @@ -2322,14 +2298,12 @@ static int rtw_check_join_candidate(struct mlme_priv *pmlmepriv if (rtw_is_desired_network(adapter, competitor) == false) goto exit; -#ifdef CONFIG_LAYER2_ROAMING if (pmlmepriv->to_roaming) { if ( rtw_get_passing_time_ms((u32)competitor->last_scanned) >= RTW_SCAN_RESULT_EXPIRE || is_same_ess(&competitor->network, &pmlmepriv->cur_network.network) == false ) goto exit; } -#endif if (*candidate == NULL ||(*candidate)->network.Rssinetwork.Rssi ) { @@ -2344,9 +2318,7 @@ static int rtw_check_join_candidate(struct mlme_priv *pmlmepriv (*candidate)->network.Ssid.Ssid, (*candidate)->network.MacAddress, (int)(*candidate)->network.Rssi); - #ifdef CONFIG_LAYER2_ROAMING DBG_88E("[to_roaming:%u]\n", pmlmepriv->to_roaming); - #endif } exit: @@ -3143,7 +3115,6 @@ void rtw_issue_addbareq_cmd(_adapter *padapter, struct xmit_frame *pxmitframe) #endif -#ifdef CONFIG_LAYER2_ROAMING void rtw_roaming(_adapter *padapter, struct wlan_network *tgt_network) { _irqL irqL; @@ -3192,4 +3163,3 @@ void _rtw_roaming(_adapter *padapter, struct wlan_network *tgt_network) } } -#endif diff --git a/include/autoconf.h b/include/autoconf.h index 5dcaa21..6798468 100644 --- a/include/autoconf.h +++ b/include/autoconf.h @@ -127,7 +127,6 @@ #define USB_INTERFERENCE_ISSUE // this should be checked in all usb interface #define CONFIG_GLOBAL_UI_PID -#define CONFIG_LAYER2_ROAMING #define CONFIG_LONG_DELAY_ISSUE #define CONFIG_NEW_SIGNAL_STAT_PROCESS #define RTW_NOTCH_FILTER 0 /* 0:Disable, 1:Enable, */ diff --git a/include/drv_types.h b/include/drv_types.h index 1eb4714..f7a0fc0 100644 --- a/include/drv_types.h +++ b/include/drv_types.h @@ -181,9 +181,7 @@ struct registry_priv char adaptor_info_caching_file_path[PATH_LENGTH_MAX]; #endif -#ifdef CONFIG_LAYER2_ROAMING u8 max_roaming_times; // the max number driver will try to roaming -#endif #ifdef CONFIG_IOL u8 fw_iol; //enable iol without other concern diff --git a/include/rtw_mlme.h b/include/rtw_mlme.h index d5c1eca..62eb03e 100644 --- a/include/rtw_mlme.h +++ b/include/rtw_mlme.h @@ -366,9 +366,7 @@ struct mlme_priv { sint fw_state; //shall we protect this variable? maybe not necessarily... u8 bScanInProcess; u8 to_join; //flag - #ifdef CONFIG_LAYER2_ROAMING u8 to_roaming; // roaming trying times - #endif u8 *nic_hdl; @@ -739,10 +737,8 @@ void rtw_issue_addbareq_cmd(_adapter *padapter, struct xmit_frame *pxmitframe); int rtw_is_same_ibss(_adapter *adapter, struct wlan_network *pnetwork); int is_same_network(WLAN_BSSID_EX *src, WLAN_BSSID_EX *dst); -#ifdef CONFIG_LAYER2_ROAMING void rtw_roaming(_adapter *padapter, struct wlan_network *tgt_network); void _rtw_roaming(_adapter *padapter, struct wlan_network *tgt_network); -#endif void rtw_stassoc_hw_rpt(_adapter *adapter,struct sta_info *psta); #endif //__RTL871X_MLME_H_ diff --git a/os_dep/ioctl_cfg80211.c b/os_dep/ioctl_cfg80211.c index 7d570eb..cbef003 100644 --- a/os_dep/ioctl_cfg80211.c +++ b/os_dep/ioctl_cfg80211.c @@ -498,7 +498,6 @@ void rtw_cfg80211_indicate_connect(_adapter *padapter) } #endif //CONFIG_P2P - #ifdef CONFIG_LAYER2_ROAMING if (pmlmepriv->to_roaming > 0) { #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 39) || defined(COMPAT_KERNEL_RELEASE) struct wiphy *wiphy = pwdev->wiphy; @@ -525,10 +524,7 @@ void rtw_cfg80211_indicate_connect(_adapter *padapter) , pmlmepriv->assoc_rsp+sizeof(struct rtw_ieee80211_hdr_3addr)+6 , pmlmepriv->assoc_rsp_len-sizeof(struct rtw_ieee80211_hdr_3addr)-6 , GFP_ATOMIC); - } - else - #endif - { + } else { DBG_88E("pwdev->sme_state(b)=%d\n", pwdev->sme_state); cfg80211_connect_result(padapter->pnetdev, cur_network->network.MacAddress , pmlmepriv->assoc_req+sizeof(struct rtw_ieee80211_hdr_3addr)+2 diff --git a/os_dep/os_intfs.c b/os_dep/os_intfs.c index 313ad21..ed69ff2 100644 --- a/os_dep/os_intfs.c +++ b/os_dep/os_intfs.c @@ -216,11 +216,9 @@ module_param(rtw_adaptor_info_caching_file_path, charp, 0644); MODULE_PARM_DESC(rtw_adaptor_info_caching_file_path, "The path of adapter info cache file"); #endif //CONFIG_ADAPTOR_INFO_CACHING_FILE -#ifdef CONFIG_LAYER2_ROAMING static uint rtw_max_roaming_times=2; module_param(rtw_max_roaming_times, uint, 0644); MODULE_PARM_DESC(rtw_max_roaming_times,"The max roaming times to try"); -#endif //CONFIG_LAYER2_ROAMING #ifdef CONFIG_IOL static int rtw_fw_iol=1;// 0:Disable, 1:enable, 2:by usb speed @@ -737,9 +735,7 @@ _func_enter_; registry_par->adaptor_info_caching_file_path[PATH_LENGTH_MAX-1]=0; #endif -#ifdef CONFIG_LAYER2_ROAMING registry_par->max_roaming_times = (u8)rtw_max_roaming_times; -#endif #ifdef CONFIG_IOL registry_par->fw_iol = rtw_fw_iol;