Commit 327c70c0 authored by Jes Sorensen's avatar Jes Sorensen Committed by Greg Kroah-Hartman

staging: rtl8723au: Make direct calls for HW_VAR_H2C_FW_{PWRMODE,JOINBSSRPT}

Signed-off-by: default avatarJes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1e7b6ebe
......@@ -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;
......
......@@ -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));
......
......@@ -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);
}
}
}
/*
......
......@@ -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);
......
......@@ -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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment