]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
staging: rtl8723au: Eliminate HW_VAR_DM_FUNC_{SET,CLR}
authorJes Sorensen <Jes.Sorensen@redhat.com>
Wed, 9 Apr 2014 21:20:43 +0000 (23:20 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 14 Apr 2014 15:29:08 +0000 (08:29 -0700)
Unroll two layers of mux/demux in the call chain for each.

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/core/rtw_wlan_util.c
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c
drivers/staging/rtl8723au/include/hal_intf.h
drivers/staging/rtl8723au/include/rtw_mlme_ext.h

index f55e86d8be65cf36b8bcfcb475ae232480357873..c18eee9222ce3099a29146027e682bc3d4718dec 100644 (file)
@@ -723,7 +723,8 @@ static void start_bss_network(struct rtw_adapter *padapter, u8 *pbuf)
                /* disable dynamic functions, such as high power, DIG */
 
                /* turn on all dynamic functions */
-               Switch_DM_Func23a(padapter, DYNAMIC_ALL_FUNC_ENABLE, true);
+               rtl8723a_odm_support_ability_set(padapter,
+                                                DYNAMIC_ALL_FUNC_ENABLE);
        }
        /* set channel, bwmode */
        p = rtw_get_ie23a((pnetwork->IEs + sizeof(struct ndis_802_11_fixed_ies)),
index 316200ea0c50fdc0de76cc912a600c5cd66fc86f..94ba6ef8f24b9575c8034a364389430ebe20b39d 100644 (file)
@@ -7719,7 +7719,6 @@ void site_survey23a(struct rtw_adapter *padapter)
                        rtl8723a_set_initial_gain(padapter, 0xff);
                        /* turn on dynamic functions */
                        rtl8723a_odm_support_ability_restore(padapter);
-                       /* Switch_DM_Func23a(padapter, DYNAMIC_FUNC_DIG|DYNAMIC_FUNC_HP|DYNAMIC_FUNC_SS, true); */
 
                        mod_timer(&pwdinfo->find_phase_timer, jiffies +
                                  msecs_to_jiffies(pwdinfo->listen_dwell * 100));
@@ -7748,7 +7747,6 @@ void site_survey23a(struct rtw_adapter *padapter)
                        rtl8723a_set_initial_gain(padapter, 0xff);
                        /* turn on dynamic functions */
                        rtl8723a_odm_support_ability_restore(padapter);
-                       /* Switch_DM_Func23a(padapter, DYNAMIC_ALL_FUNC_ENABLE, true); */
 
                        if (is_client_associated_to_ap23a(padapter) == true)
                        {
@@ -8705,7 +8703,7 @@ void mlmeext_joinbss_event_callback23a(struct rtw_adapter *padapter, int join_re
        }
 
        /* turn on dynamic functions */
-       Switch_DM_Func23a(padapter, DYNAMIC_ALL_FUNC_ENABLE, true);
+       rtl8723a_odm_support_ability_set(padapter, DYNAMIC_ALL_FUNC_ENABLE);
 
        /*  update IOT-releated issue */
        update_IOT_info23a(padapter);
@@ -9225,7 +9223,8 @@ u8 createbss_hdl23a(struct rtw_adapter *padapter, u8 *pbuf)
                /* disable dynamic functions, such as high power, DIG */
                rtl8723a_odm_support_ability_backup(padapter);
 
-               Switch_DM_Func23a(padapter, DYNAMIC_FUNC_DISABLE, false);
+               rtl8723a_odm_support_ability_clr(padapter,
+                                                DYNAMIC_FUNC_DISABLE);
 
                /* cancel link timer */
                del_timer_sync(&pmlmeext->link_timer);
@@ -9355,8 +9354,6 @@ u8 join_cmd_hdl23a(struct rtw_adapter *padapter, u8 *pbuf)
 
                i += (pIE->Length + 2);
        }
-       /* disable dynamic functions, such as high power, DIG */
-       /* Switch_DM_Func23a(padapter, DYNAMIC_FUNC_DISABLE, false); */
 
        hw_var_set_bssid(padapter, pmlmeinfo->network.MacAddress);
        hw_var_set_mlme_join(padapter, 0);
@@ -9537,7 +9534,8 @@ u8 sitesurvey_cmd_hdl23a(struct rtw_adapter *padapter, u8 *pbuf)
            (pmlmeext->sitesurvey_res.state == SCAN_TXNULL)) {
                /* disable dynamic functions, such as high power, DIG */
                rtl8723a_odm_support_ability_backup(padapter);
-               Switch_DM_Func23a(padapter, DYNAMIC_FUNC_DISABLE, false);
+               rtl8723a_odm_support_ability_clr(padapter,
+                                                DYNAMIC_FUNC_DISABLE);
 
                /* config the initial gain under scaning, need to
                   write the BB registers */
index dd2a6f18f7d700c88f98858b14f695d4f5027ed1..5bf7beb6d19cdeb90e80eb8edb8f3c272bb88a55 100644 (file)
@@ -140,9 +140,6 @@ static void sreset_restore_network_station(struct rtw_adapter *padapter)
        set_channel_bwmode23a(padapter, pmlmeext->cur_channel,
                              pmlmeext->cur_ch_offset, pmlmeext->cur_bwmode);
 
-       /* disable dynamic functions, such as high power, DIG */
-       /* Switch_DM_Func23a(padapter, DYNAMIC_FUNC_DISABLE, false); */
-
        hw_var_set_bssid(padapter, pmlmeinfo->network.MacAddress);
        hw_var_set_mlme_join(padapter, 0);
 
index 809d4167731f27911ab2223928015f07e0863e48..227280230deeb45434ac131ad86e7f73e58d6f3a 100644 (file)
@@ -283,14 +283,6 @@ void Update23aTblForSoftAP(u8 *bssrateset, u32 bssratelen)
        }
 }
 
-void Switch_DM_Func23a(struct rtw_adapter *padapter, unsigned long mode, u8 enable)
-{
-       if (enable == true)
-               rtw_hal_set_hwreg23a(padapter, HW_VAR_DM_FUNC_SET, (u8 *)(&mode));
-       else
-               rtw_hal_set_hwreg23a(padapter, HW_VAR_DM_FUNC_CLR, (u8 *)(&mode));
-}
-
 void Set_MSR23a(struct rtw_adapter *padapter, u8 type)
 {
        rtl8723a_set_media_status(padapter, type);
@@ -1485,15 +1477,15 @@ void update_IOT_info23a(struct rtw_adapter *padapter)
                pmlmeinfo->turboMode_cts2self = 0;
                pmlmeinfo->turboMode_rtsen = 1;
                /* disable high power */
-               Switch_DM_Func23a(padapter, ~DYNAMIC_BB_DYNAMIC_TXPWR,
-                              false);
+               rtl8723a_odm_support_ability_clr(padapter, (u32)
+                                                ~DYNAMIC_BB_DYNAMIC_TXPWR);
                break;
        case HT_IOT_PEER_REALTEK:
                /* rtw_write16(padapter, 0x4cc, 0xffff); */
                /* rtw_write16(padapter, 0x546, 0x01c0); */
                /* disable high power */
-               Switch_DM_Func23a(padapter, ~DYNAMIC_BB_DYNAMIC_TXPWR,
-                              false);
+               rtl8723a_odm_support_ability_clr(padapter, (u32)
+                                                ~DYNAMIC_BB_DYNAMIC_TXPWR);
                break;
        default:
                pmlmeinfo->turboMode_cts2self = 0;
index 79e63bfb0b2eec2c1d3b9fb7c4b98935eca03fa7..62089f846838f4cdec008002911da1a255e4a3b1 100644 (file)
@@ -3142,13 +3142,6 @@ void SetHwReg8723A(struct rtw_adapter *padapter, u8 variable, u8 *val)
        case HW_VAR_DM_FLAG:
                rtl8723a_odm_support_ability_write(padapter, *val32);
                break;
-       case HW_VAR_DM_FUNC_SET:
-               rtl8723a_odm_support_ability_set(padapter, *val32);
-               break;
-
-       case HW_VAR_DM_FUNC_CLR:
-               rtl8723a_odm_support_ability_clr(padapter, *val32);
-               break;
 
        case HW_VAR_EFUSE_BYTES:
                pHalData->EfuseUsedBytes = *((u16 *) val);
index 2218032ef6174609db1beb99a8f61d7cb2b4f541..2675fc09fecf096fe1772ad6df0f2cf84ffb8d65 100644 (file)
@@ -40,8 +40,6 @@ enum HW_VARIABLES {
        HW_VAR_TXPAUSE,
        HW_VAR_RF_TYPE,
        HW_VAR_DM_FLAG,
-       HW_VAR_DM_FUNC_SET,
-       HW_VAR_DM_FUNC_CLR,
        HW_VAR_CAM_READ,
        HW_VAR_FWLPS_RF_ON,
        HW_VAR_TDLS_WRCR,
index 53b2d0a34734cfab076d53dcd3f5368ab9c39524..7729b2be25ae0eb1cec14a624b06e7d6e4df7a3b 100644 (file)
@@ -474,8 +474,6 @@ void get_rate_set23a(struct rtw_adapter *padapter, unsigned char *pbssrate,
 void UpdateBrateTbl23a(struct rtw_adapter *padapter,u8 *mBratesOS);
 void Update23aTblForSoftAP(u8 *bssrateset, u32 bssratelen);
 
-void Switch_DM_Func23a(struct rtw_adapter *padapter, unsigned long mode, u8 enable);
-
 void Set_MSR23a(struct rtw_adapter *padapter, u8 type);
 
 u8 rtw_get_oper_ch23a(struct rtw_adapter *adapter);