staging: rtl8723au: Eliminate HW_VAR_SEC_CFG usage
authorJes Sorensen <Jes.Sorensen@redhat.com>
Wed, 9 Apr 2014 21:20:27 +0000 (23:20 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 14 Apr 2014 15:29:02 +0000 (08:29 -0700)
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723au/core/rtw_ap.c
drivers/staging/rtl8723au/core/rtw_mlme_ext.c
drivers/staging/rtl8723au/core/rtw_sreset.c
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c
drivers/staging/rtl8723au/include/hal_intf.h

index 888901aa9b13ccdbf5803f31d17677e5dbc54e19..18ade6036b23e2b448ad27c84e4270cb9b023f7c 100644 (file)
@@ -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);
index 90efa4738d96df4ea77e8fe6788e11cb3cdea4bc..068203e62688bd8b0ee89a2d73c5ddd20813ddcc 100644 (file)
@@ -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);
index e3c189556794df7937c05dc0cdcd549dc1b10e63..e243a3afcdcd51e2d8c55936857afdd323a45dcf 100644 (file)
@@ -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_)) {
index fba69da87dd42ce285dd1ab0a50b001ff5628eb9..6d574cd961291b8f2cfbc53a2257d1a1149de1fa 100644 (file)
@@ -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;
index b63643641e6275ba1d1e9d6f148ec7255c11ec92..8e3dd1264380f029167d9edded8f3882abcbe86b 100644 (file)
@@ -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,