From: Jes Sorensen Date: Wed, 9 Apr 2014 21:20:27 +0000 (+0200) Subject: staging: rtl8723au: Eliminate HW_VAR_SEC_CFG usage X-Git-Tag: next-20140428~14^2~498 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=b8e99163b3181142bb781c3113facb194eae8e49;p=karo-tx-linux.git staging: rtl8723au: Eliminate HW_VAR_SEC_CFG usage Signed-off-by: Jes Sorensen Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8723au/core/rtw_ap.c b/drivers/staging/rtl8723au/core/rtw_ap.c index 888901aa9b13..18ade6036b23 100644 --- a/drivers/staging/rtl8723au/core/rtw_ap.c +++ b/drivers/staging/rtl8723au/core/rtw_ap.c @@ -708,8 +708,9 @@ static void start_bss_network(struct rtw_adapter *padapter, u8 *pbuf) rtw_hal_set_hwreg23a(padapter, HW_VAR_AC_PARAM_BK, (u8 *)(&acparm)); /* Set Security */ - val8 = (psecuritypriv->dot11AuthAlgrthm == dot11AuthAlgrthm_8021X)? 0xcc: 0xcf; - rtw_hal_set_hwreg23a(padapter, HW_VAR_SEC_CFG, (u8 *)(&val8)); + val8 = (psecuritypriv->dot11AuthAlgrthm == dot11AuthAlgrthm_8021X) ? + 0xcc: 0xcf; + rtl8723a_set_sec_cfg(padapter, val8); /* Beacon Control related register */ rtl8723a_set_beacon_interval(padapter, bcn_interval); diff --git a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c index 90efa4738d96..068203e62688 100644 --- a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c +++ b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c @@ -7968,7 +7968,6 @@ u8 collect_bss_info23a(struct rtw_adapter *padapter, struct recv_frame *precv_fr void start_create_ibss23a(struct rtw_adapter* padapter) { unsigned short caps; - u8 val8; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info; struct wlan_bssid_ex *pnetwork = &pmlmeinfo->network; @@ -7981,10 +7980,8 @@ void start_create_ibss23a(struct rtw_adapter* padapter) /* udpate capability */ caps = rtw_get_capability23a(pnetwork); update_capinfo23a(padapter, caps); - if (caps&cap_IBSS)/* adhoc master */ - { - val8 = 0xcf; - rtw_hal_set_hwreg23a(padapter, HW_VAR_SEC_CFG, (u8 *)(&val8)); + if (caps&cap_IBSS) { /* adhoc master */ + rtl8723a_set_sec_cfg(padapter, 0xcf); /* switch channel */ /* SelectChannel23a(padapter, pmlmeext->cur_channel, HAL_PRIME_CHNL_OFFSET_DONT_CARE); */ @@ -8044,9 +8041,10 @@ void start_clnt_join23a(struct rtw_adapter* padapter) Set_MSR23a(padapter, WIFI_FW_STATION_STATE); - val8 = (pmlmeinfo->auth_algo == dot11AuthAlgrthm_8021X)? 0xcc: 0xcf; + val8 = (pmlmeinfo->auth_algo == dot11AuthAlgrthm_8021X) ? + 0xcc: 0xcf; - rtw_hal_set_hwreg23a(padapter, HW_VAR_SEC_CFG, (u8 *)(&val8)); + rtl8723a_set_sec_cfg(padapter, val8); /* switch channel */ /* set_channel_bwmode23a(padapter, pmlmeext->cur_channel, pmlmeext->cur_ch_offset, pmlmeext->cur_bwmode); */ @@ -8059,12 +8057,10 @@ void start_clnt_join23a(struct rtw_adapter* padapter) msecs_to_jiffies((REAUTH_TO * REAUTH_LIMIT) + (REASSOC_TO*REASSOC_LIMIT) + beacon_timeout)); pmlmeinfo->state = WIFI_FW_AUTH_NULL | WIFI_FW_STATION_STATE; } - else if (caps&cap_IBSS) /* adhoc client */ - { + else if (caps&cap_IBSS) { /* adhoc client */ Set_MSR23a(padapter, WIFI_FW_ADHOC_STATE); - val8 = 0xcf; - rtw_hal_set_hwreg23a(padapter, HW_VAR_SEC_CFG, (u8 *)(&val8)); + rtl8723a_set_sec_cfg(padapter, 0xcf); /* switch channel */ set_channel_bwmode23a(padapter, pmlmeext->cur_channel, pmlmeext->cur_ch_offset, pmlmeext->cur_bwmode); diff --git a/drivers/staging/rtl8723au/core/rtw_sreset.c b/drivers/staging/rtl8723au/core/rtw_sreset.c index e3c189556794..e243a3afcdcd 100644 --- a/drivers/staging/rtl8723au/core/rtw_sreset.c +++ b/drivers/staging/rtl8723au/core/rtw_sreset.c @@ -99,7 +99,8 @@ static void sreset_restore_security_station(struct rtw_adapter *padapter) val8 = 0xcc; else val8 = 0xcf; - rtw_hal_set_hwreg23a(padapter, HW_VAR_SEC_CFG, (u8 *)(&val8)); + + rtl8723a_set_sec_cfg(padapter, val8); if ((padapter->securitypriv.dot11PrivacyAlgrthm == _TKIP_) || (padapter->securitypriv.dot11PrivacyAlgrthm == _AES_)) { diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c b/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c index fba69da87dd4..6d574cd96129 100644 --- a/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c +++ b/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c @@ -3143,10 +3143,6 @@ void SetHwReg8723A(struct rtw_adapter *padapter, u8 variable, u8 *val) rtl8723a_set_bcn_func(padapter, *val); break; - case HW_VAR_SEC_CFG: - rtl8723a_set_sec_cfg(padapter, *val); - break; - case HW_VAR_DM_FLAG: rtl8723a_odm_support_ability_write(padapter, *val32); break; diff --git a/drivers/staging/rtl8723au/include/hal_intf.h b/drivers/staging/rtl8723au/include/hal_intf.h index b63643641e62..8e3dd1264380 100644 --- a/drivers/staging/rtl8723au/include/hal_intf.h +++ b/drivers/staging/rtl8723au/include/hal_intf.h @@ -39,7 +39,6 @@ enum HW_VARIABLES { HW_VAR_INIT_RTS_RATE, HW_VAR_TXPAUSE, HW_VAR_BCN_FUNC, - HW_VAR_SEC_CFG, HW_VAR_RF_TYPE, HW_VAR_DM_FLAG, HW_VAR_DM_FUNC_OP,