From: Jes Sorensen Date: Wed, 9 Apr 2014 21:20:21 +0000 (+0200) Subject: staging: rtl8723au: Eliminate HW_VAR_MLME_SITESURVEY usage X-Git-Tag: next-20140428~14^2~504 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=a086023ac5bbc14019c2c17e07b98e2e6ee95208;p=karo-tx-linux.git staging: rtl8723au: Eliminate HW_VAR_MLME_SITESURVEY usage Signed-off-by: Jes Sorensen Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c index 87e4df63b283..ef0a829e365a 100644 --- a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c +++ b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c @@ -7615,7 +7615,7 @@ bool IsLegal5GChannel(struct rtw_adapter *Adapter, u8 channel) void site_survey23a(struct rtw_adapter *padapter) { - unsigned char survey_channel = 0, val8; + unsigned char survey_channel = 0; enum rt_scan_type ScanType = SCAN_PASSIVE; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info; @@ -7761,8 +7761,7 @@ void site_survey23a(struct rtw_adapter *padapter) } - val8 = 0; /* survey done */ - rtw_hal_set_hwreg23a(padapter, HW_VAR_MLME_SITESURVEY, (u8 *)(&val8)); + rtl8723a_mlme_sitesurvey(padapter, 0); report_surveydone_event23a(padapter); @@ -9518,7 +9517,6 @@ u8 sitesurvey_cmd_hdl23a(struct rtw_adapter *padapter, u8 *pbuf) struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct sitesurvey_parm *pparm = (struct sitesurvey_parm *)pbuf; u8 bdelayscan = false; - u8 val8; u32 initialgain; u32 i; @@ -9589,9 +9587,7 @@ u8 sitesurvey_cmd_hdl23a(struct rtw_adapter *padapter, u8 *pbuf) /* set MSR to no link state */ Set_MSR23a(padapter, _HW_STATE_NOLINK_); - val8 = 1; /* under site survey */ - rtw_hal_set_hwreg23a(padapter, HW_VAR_MLME_SITESURVEY, - (u8 *)(&val8)); + rtl8723a_mlme_sitesurvey(padapter, 1); pmlmeext->sitesurvey_res.state = SCAN_PROCESS; } diff --git a/drivers/staging/rtl8723au/core/rtw_p2p.c b/drivers/staging/rtl8723au/core/rtw_p2p.c index 27a6cc76973d..67d17a17a6b1 100644 --- a/drivers/staging/rtl8723au/core/rtw_p2p.c +++ b/drivers/staging/rtl8723au/core/rtw_p2p.c @@ -3120,45 +3120,40 @@ static void restore_p2p_state_handler(struct rtw_adapter *padapter) static void pre_tx_invitereq_handler(struct rtw_adapter *padapter) { struct wifidirect_info *pwdinfo = &padapter->wdinfo; - u8 val8 = 1; set_channel_bwmode23a(padapter, pwdinfo->invitereq_info.peer_ch, HAL_PRIME_CHNL_OFFSET_DONT_CARE, HT_CHANNEL_WIDTH_20); - padapter->HalFunc.SetHwRegHandler(padapter, HW_VAR_MLME_SITESURVEY, (u8 *)(&val8)); + rtl8723a_mlme_sitesurvey(padapter, 1); issue23a_probereq_p2p(padapter, NULL); mod_timer(&pwdinfo->pre_tx_scan_timer, jiffies + msecs_to_jiffies(P2P_TX_PRESCAN_TIMEOUT)); - - } static void pre_tx_provdisc_handler(struct rtw_adapter *padapter) { struct wifidirect_info *pwdinfo = &padapter->wdinfo; - u8 val8 = 1; - - set_channel_bwmode23a(padapter, pwdinfo->tx_prov_disc_info.peer_channel_num[0], HAL_PRIME_CHNL_OFFSET_DONT_CARE, HT_CHANNEL_WIDTH_20); - rtw_hal_set_hwreg23a(padapter, HW_VAR_MLME_SITESURVEY, (u8 *)(&val8)); + set_channel_bwmode23a(padapter, + pwdinfo->tx_prov_disc_info.peer_channel_num[0], + HAL_PRIME_CHNL_OFFSET_DONT_CARE, + HT_CHANNEL_WIDTH_20); + rtl8723a_mlme_sitesurvey(padapter, 1); issue23a_probereq_p2p(padapter, NULL); mod_timer(&pwdinfo->pre_tx_scan_timer, jiffies + msecs_to_jiffies(P2P_TX_PRESCAN_TIMEOUT)); - - } static void pre_tx_negoreq_handler(struct rtw_adapter *padapter) { struct wifidirect_info *pwdinfo = &padapter->wdinfo; - u8 val8 = 1; - - set_channel_bwmode23a(padapter, pwdinfo->nego_req_info.peer_channel_num[0], HAL_PRIME_CHNL_OFFSET_DONT_CARE, HT_CHANNEL_WIDTH_20); - rtw_hal_set_hwreg23a(padapter, HW_VAR_MLME_SITESURVEY, (u8 *)(&val8)); + set_channel_bwmode23a(padapter, + pwdinfo->nego_req_info.peer_channel_num[0], + HAL_PRIME_CHNL_OFFSET_DONT_CARE, + HT_CHANNEL_WIDTH_20); + rtl8723a_mlme_sitesurvey(padapter, 1); issue23a_probereq_p2p(padapter, NULL); mod_timer(&pwdinfo->pre_tx_scan_timer, jiffies + msecs_to_jiffies(P2P_TX_PRESCAN_TIMEOUT)); - - } static void ro_ch_handler(struct rtw_adapter *padapter) diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c b/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c index 0c1eaed9d44a..bcf400dcb823 100644 --- a/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c +++ b/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c @@ -3147,10 +3147,6 @@ void SetHwReg8723A(struct rtw_adapter *padapter, u8 variable, u8 *val) rtl8723a_check_bssid(padapter, *val); break; - case HW_VAR_MLME_SITESURVEY: - rtl8723a_mlme_sitesurvey(padapter, *val); - break; - case HW_VAR_MLME_JOIN: hw_var_set_mlme_join(padapter, *val); break; diff --git a/drivers/staging/rtl8723au/include/hal_intf.h b/drivers/staging/rtl8723au/include/hal_intf.h index eb011360cc0e..163743190625 100644 --- a/drivers/staging/rtl8723au/include/hal_intf.h +++ b/drivers/staging/rtl8723au/include/hal_intf.h @@ -40,7 +40,6 @@ enum HW_VARIABLES { HW_VAR_TXPAUSE, HW_VAR_BCN_FUNC, HW_VAR_CHECK_BSSID, - HW_VAR_MLME_SITESURVEY, HW_VAR_MLME_JOIN, HW_VAR_BEACON_INTERVAL, HW_VAR_SLOT_TIME,