staging: rtl8723au: Make direct calls for HW_VAR_H2C_FW_{PWRMODE,JOINBSSRPT}
authorJes Sorensen <Jes.Sorensen@redhat.com>
Wed, 9 Apr 2014 21:20:37 +0000 (23:20 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 14 Apr 2014 15:29:06 +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_cmd.c
drivers/staging/rtl8723au/core/rtw_p2p.c
drivers/staging/rtl8723au/core/rtw_pwrctrl.c
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c
drivers/staging/rtl8723au/include/hal_intf.h

index 5e3088a01800d554115fb64e6011f15e5b4ce085..0b25cd2f6584eb8097b065878716d83b1bad9252 100644 (file)
@@ -1269,8 +1269,7 @@ void lps_ctrl_wk_hdl(struct rtw_adapter *padapter, u8 lps_ctrl_type)
                        mstatus = 1;/* connect */
                        /*  Reset LPS Setting */
                        padapter->pwrctrlpriv.LpsIdleCount = 0;
-                       rtw_hal_set_hwreg23a(padapter, HW_VAR_H2C_FW_JOINBSSRPT,
-                                            (u8 *)&mstatus);
+                       rtl8723a_set_FwJoinBssReport_cmd(padapter, 1);
 #ifdef CONFIG_8723AU_BT_COEXIST
                        BT_WifiMediaStatusNotify(padapter, mstatus);
 #endif
@@ -1284,8 +1283,7 @@ void lps_ctrl_wk_hdl(struct rtw_adapter *padapter, u8 lps_ctrl_type)
                        {
                                LPS_Leave23a(padapter);
                        }
-                       rtw_hal_set_hwreg23a(padapter, HW_VAR_H2C_FW_JOINBSSRPT,
-                                            (u8 *)&mstatus);
+                       rtl8723a_set_FwJoinBssReport_cmd(padapter, 0);
                        break;
                case LPS_CTRL_SPECIAL_PACKET:
                        pwrpriv->DelayLPSLastTimeStamp = jiffies;
index 67d17a17a6b15937024ef8962ef09ae153d4eb6b..81eebe5b74d9166c4f1b70b520b16313cc8d5b1e 100644 (file)
@@ -16,6 +16,7 @@
 
 #include <drv_types.h>
 #include <rtw_p2p.h>
+#include <rtl8723a_cmd.h>
 #include <wifi.h>
 
 #ifdef CONFIG_8723AU_P2P
@@ -3573,12 +3574,10 @@ void p2p_ps_wk_hdl23a(struct rtw_adapter *padapter, u8 p2p_ps_state)
                        pwdinfo->opp_ps = 0;
                        pwdinfo->noa_num = 0;
                        pwdinfo->p2p_ps_mode = P2P_PS_NONE;
-                       if (padapter->pwrctrlpriv.bFwCurrentInPSMode == true)
-                       {
-                               if (pwrpriv->smart_ps == 0)
-                               {
+                       if (padapter->pwrctrlpriv.bFwCurrentInPSMode == true) {
+                               if (pwrpriv->smart_ps == 0) {
                                        pwrpriv->smart_ps = 2;
-                                       rtw_hal_set_hwreg23a(padapter, HW_VAR_H2C_FW_PWRMODE, (u8 *)&padapter->pwrctrlpriv.pwr_mode);
+                                       rtl8723a_set_FwPwrMode_cmd(padapter, padapter->pwrctrlpriv.pwr_mode);
                                }
                        }
                        break;
@@ -3586,13 +3585,11 @@ void p2p_ps_wk_hdl23a(struct rtw_adapter *padapter, u8 p2p_ps_state)
                        if (pwdinfo->p2p_ps_mode > P2P_PS_NONE) {
                                pwdinfo->p2p_ps_state = p2p_ps_state;
 
-                               if (pwdinfo->ctwindow > 0)
-                               {
-                                       if (pwrpriv->smart_ps != 0)
-                                       {
+                               if (pwdinfo->ctwindow > 0) {
+                                       if (pwrpriv->smart_ps != 0) {
                                                pwrpriv->smart_ps = 0;
                                                DBG_8723A("%s(): Enter CTW, change SmartPS\n", __func__);
-                                               rtw_hal_set_hwreg23a(padapter, HW_VAR_H2C_FW_PWRMODE, (u8 *)&padapter->pwrctrlpriv.pwr_mode);
+                                               rtl8723a_set_FwPwrMode_cmd(padapter, padapter->pwrctrlpriv.pwr_mode);
                                        }
                                }
                                rtw_hal_set_hwreg23a(padapter, HW_VAR_H2C_FW_P2P_PS_OFFLOAD, (u8 *)(&p2p_ps_state));
index 8ddd67f194ba7bf406b083ea95ebd5a7d9a74d07..c2e86529047bbd3e5481398a050114b7b3e561b4 100644 (file)
@@ -341,25 +341,22 @@ void rtw_set_ps_mode23a(struct rtw_adapter *padapter, u8 ps_mode, u8 smart_ps, u
 
                        pwrpriv->pwr_mode = ps_mode;
                        rtw_set_rpwm23a(padapter, PS_STATE_S4);
-                       rtw_hal_set_hwreg23a(padapter, HW_VAR_H2C_FW_PWRMODE, (u8 *)(&ps_mode));
+                       rtl8723a_set_FwPwrMode_cmd(padapter, ps_mode);
                        pwrpriv->bFwCurrentInPSMode = false;
                }
-       }
-       else
-       {
+       } else {
                if (PS_RDY_CHECK(padapter)
 #ifdef CONFIG_8723AU_BT_COEXIST
                        || (BT_1Ant(padapter) == true)
 #endif
-                       )
-               {
+                       ) {
                        DBG_8723A("%s: Enter 802.11 power save\n", __func__);
 
                        pwrpriv->bFwCurrentInPSMode = true;
                        pwrpriv->pwr_mode = ps_mode;
                        pwrpriv->smart_ps = smart_ps;
                        pwrpriv->bcn_ant_mode = bcn_ant_mode;
-                       rtw_hal_set_hwreg23a(padapter, HW_VAR_H2C_FW_PWRMODE, (u8 *)(&ps_mode));
+                       rtl8723a_set_FwPwrMode_cmd(padapter, ps_mode);
 
 #ifdef CONFIG_8723AU_P2P
                        /*  Set CTWindow after LPS */
@@ -370,8 +367,6 @@ void rtw_set_ps_mode23a(struct rtw_adapter *padapter, u8 ps_mode, u8 smart_ps, u
                        rtw_set_rpwm23a(padapter, PS_STATE_S2);
                }
        }
-
-
 }
 
 /*
index fee79d1a190aad89bcd84ba36040462d2b2f14eb..2e0350952d0ad11fe5f88996bd2d82fed13e36e2 100644 (file)
@@ -3153,14 +3153,6 @@ void SetHwReg8723A(struct rtw_adapter *padapter, u8 variable, u8 *val)
                rtl8723a_odm_support_ability_clr(padapter, *val32);
                break;
 
-       case HW_VAR_H2C_FW_PWRMODE:
-               rtl8723a_set_FwPwrMode_cmd(padapter, *val);
-               break;
-
-       case HW_VAR_H2C_FW_JOINBSSRPT:
-               rtl8723a_set_FwJoinBssReport_cmd(padapter, *val);
-               break;
-
 #ifdef CONFIG_8723AU_P2P
        case HW_VAR_H2C_FW_P2P_PS_OFFLOAD:
                rtl8723a_set_p2p_ps_offload_cmd(padapter, *val);
index e2b9fdcb219202e068e9cbc5730fb7d3715df7cc..27b0eb8bb8669e7488201408f4cee774c6171ab7 100644 (file)
@@ -45,8 +45,6 @@ enum HW_VARIABLES {
        HW_VAR_DM_FUNC_CLR,
        HW_VAR_CAM_READ,
        HW_VAR_SET_RPWM,
-       HW_VAR_H2C_FW_PWRMODE,
-       HW_VAR_H2C_FW_JOINBSSRPT,
        HW_VAR_FWLPS_RF_ON,
        HW_VAR_H2C_FW_P2P_PS_OFFLOAD,
        HW_VAR_TDLS_WRCR,