From: Jes Sorensen Date: Wed, 9 Apr 2014 21:20:37 +0000 (+0200) Subject: staging: rtl8723au: Make direct calls for HW_VAR_H2C_FW_{PWRMODE,JOINBSSRPT} X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=327c70c04b2d045b9eea15d1ac30e4254ac4f687;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git staging: rtl8723au: Make direct calls for HW_VAR_H2C_FW_{PWRMODE,JOINBSSRPT} Signed-off-by: Jes Sorensen Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8723au/core/rtw_cmd.c b/drivers/staging/rtl8723au/core/rtw_cmd.c index 5e3088a01800..0b25cd2f6584 100644 --- a/drivers/staging/rtl8723au/core/rtw_cmd.c +++ b/drivers/staging/rtl8723au/core/rtw_cmd.c @@ -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; diff --git a/drivers/staging/rtl8723au/core/rtw_p2p.c b/drivers/staging/rtl8723au/core/rtw_p2p.c index 67d17a17a6b1..81eebe5b74d9 100644 --- a/drivers/staging/rtl8723au/core/rtw_p2p.c +++ b/drivers/staging/rtl8723au/core/rtw_p2p.c @@ -16,6 +16,7 @@ #include #include +#include #include #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)); diff --git a/drivers/staging/rtl8723au/core/rtw_pwrctrl.c b/drivers/staging/rtl8723au/core/rtw_pwrctrl.c index 8ddd67f194ba..c2e86529047b 100644 --- a/drivers/staging/rtl8723au/core/rtw_pwrctrl.c +++ b/drivers/staging/rtl8723au/core/rtw_pwrctrl.c @@ -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); } } - - } /* diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c b/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c index fee79d1a190a..2e0350952d0a 100644 --- a/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c +++ b/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c @@ -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); diff --git a/drivers/staging/rtl8723au/include/hal_intf.h b/drivers/staging/rtl8723au/include/hal_intf.h index e2b9fdcb2192..27b0eb8bb866 100644 --- a/drivers/staging/rtl8723au/include/hal_intf.h +++ b/drivers/staging/rtl8723au/include/hal_intf.h @@ -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,