1
0
mirror of https://github.com/aircrack-ng/rtl8812au.git synced 2024-11-30 00:47:38 +00:00

Disable messages about power save in Monitor mode

This commit is contained in:
kimocoder 2019-11-13 16:23:44 +01:00
parent 8fc76b7fe3
commit 8e0a042805

View File

@ -286,7 +286,7 @@ void rtw_ps_processor(_adapter *padapter)
_enter_pwrlock(&adapter_to_pwrctl(padapter)->lock); _enter_pwrlock(&adapter_to_pwrctl(padapter)->lock);
ps_deny = rtw_ps_deny_get(padapter); ps_deny = rtw_ps_deny_get(padapter);
_exit_pwrlock(&adapter_to_pwrctl(padapter)->lock); _exit_pwrlock(&adapter_to_pwrctl(padapter)->lock);
if (ps_deny != 0) { if ((ps_deny & (~(1<<PS_DENY_MONITOR_MODE))) != 0) {
RTW_INFO(FUNC_ADPT_FMT ": ps_deny=0x%08X, skip power save!\n", RTW_INFO(FUNC_ADPT_FMT ": ps_deny=0x%08X, skip power save!\n",
FUNC_ADPT_ARG(padapter), ps_deny); FUNC_ADPT_ARG(padapter), ps_deny);
goto exit; goto exit;
@ -474,8 +474,6 @@ void traffic_check_for_leave_lps(PADAPTER padapter, u8 tx, u32 tx_packets)
u8 bLeaveLPS = _FALSE; u8 bLeaveLPS = _FALSE;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
if (tx) { /* from tx */ if (tx) { /* from tx */
xmit_cnt += tx_packets; xmit_cnt += tx_packets;
@ -884,8 +882,6 @@ void rtw_set_ps_mode(PADAPTER padapter, u8 ps_mode, u8 smart_ps, u8 bcn_ant_mode
u8 lps_pg_hdl_id = 0; u8 lps_pg_hdl_id = 0;
#endif #endif
if (ps_mode > PM_Card_Disable) { if (ps_mode > PM_Card_Disable) {
return; return;
} }
@ -1085,7 +1081,6 @@ void rtw_set_ps_mode(PADAPTER padapter, u8 ps_mode, u8 smart_ps, u8 bcn_ant_mode
pwrpriv->wmm_smart_ps = pregistrypriv->wmm_smart_ps; pwrpriv->wmm_smart_ps = pregistrypriv->wmm_smart_ps;
#endif /* CONFIG_WMMPS_STA */ #endif /* CONFIG_WMMPS_STA */
if (check_fwstate(pmlmepriv, _FW_LINKED)) if (check_fwstate(pmlmepriv, _FW_LINKED))
rtw_hal_set_hwreg(padapter, HW_VAR_H2C_FW_PWRMODE, (u8 *)(&ps_mode)); rtw_hal_set_hwreg(padapter, HW_VAR_H2C_FW_PWRMODE, (u8 *)(&ps_mode));
#ifdef CONFIG_WOWLAN #ifdef CONFIG_WOWLAN
@ -1227,7 +1222,6 @@ void LPS_Leave(PADAPTER padapter, const char *msg)
struct debug_priv *pdbgpriv = &dvobj->drv_dbg; struct debug_priv *pdbgpriv = &dvobj->drv_dbg;
#endif #endif
/* RTW_INFO("+LeisurePSLeave\n"); */ /* RTW_INFO("+LeisurePSLeave\n"); */
#ifdef CONFIG_BT_COEXIST #ifdef CONFIG_BT_COEXIST
@ -1431,7 +1425,6 @@ void LPS_Leave_check(
systime start_time; systime start_time;
u8 bReady; u8 bReady;
pwrpriv = adapter_to_pwrctl(padapter); pwrpriv = adapter_to_pwrctl(padapter);
bReady = _FALSE; bReady = _FALSE;
@ -1653,7 +1646,6 @@ static void pwr_rpwm_timeout_handler(void *FunctionContext)
PADAPTER padapter; PADAPTER padapter;
struct pwrctrl_priv *pwrpriv; struct pwrctrl_priv *pwrpriv;
padapter = (PADAPTER)FunctionContext; padapter = (PADAPTER)FunctionContext;
pwrpriv = adapter_to_pwrctl(padapter); pwrpriv = adapter_to_pwrctl(padapter);
if (!padapter) if (!padapter)
@ -1683,7 +1675,6 @@ __inline static void unregister_task_alive(struct pwrctrl_priv *pwrctrl, u32 tag
pwrctrl->alives &= ~tag; pwrctrl->alives &= ~tag;
} }
/* /*
* Description: * Description:
* Check if the fw_pwrstate is okay for I/O. * Check if the fw_pwrstate is okay for I/O.
@ -1733,7 +1724,6 @@ s32 rtw_register_task_alive(PADAPTER padapter, u32 task)
} }
#endif /* CONFIG_DETECT_CPWM_BY_POLLING */ #endif /* CONFIG_DETECT_CPWM_BY_POLLING */
return res; return res;
} }
@ -1752,7 +1742,6 @@ void rtw_unregister_task_alive(PADAPTER padapter, u32 task)
struct pwrctrl_priv *pwrctrl; struct pwrctrl_priv *pwrctrl;
u8 pslv; u8 pslv;
pwrctrl = adapter_to_pwrctl(padapter); pwrctrl = adapter_to_pwrctl(padapter);
pslv = PS_STATE_S0; pslv = PS_STATE_S0;
@ -1832,7 +1821,6 @@ s32 rtw_register_tx_alive(PADAPTER padapter)
} }
#endif /* CONFIG_DETECT_CPWM_BY_POLLING */ #endif /* CONFIG_DETECT_CPWM_BY_POLLING */
return res; return res;
} }
@ -1883,7 +1871,6 @@ s32 rtw_register_cmd_alive(PADAPTER padapter)
} }
#endif /* CONFIG_DETECT_CPWM_BY_POLLING */ #endif /* CONFIG_DETECT_CPWM_BY_POLLING */
return res; return res;
} }
@ -1926,7 +1913,6 @@ s32 rtw_register_evt_alive(PADAPTER padapter)
{ {
struct pwrctrl_priv *pwrctrl; struct pwrctrl_priv *pwrctrl;
pwrctrl = adapter_to_pwrctl(padapter); pwrctrl = adapter_to_pwrctl(padapter);
_enter_pwrlock(&pwrctrl->lock); _enter_pwrlock(&pwrctrl->lock);
@ -1935,7 +1921,6 @@ s32 rtw_register_evt_alive(PADAPTER padapter)
_exit_pwrlock(&pwrctrl->lock); _exit_pwrlock(&pwrctrl->lock);
return _SUCCESS; return _SUCCESS;
} }
@ -1953,7 +1938,6 @@ void rtw_unregister_tx_alive(PADAPTER padapter)
struct dvobj_priv *dvobj = adapter_to_dvobj(padapter); struct dvobj_priv *dvobj = adapter_to_dvobj(padapter);
u8 pslv, i; u8 pslv, i;
pwrctrl = adapter_to_pwrctl(padapter); pwrctrl = adapter_to_pwrctl(padapter);
pslv = PS_STATE_S0; pslv = PS_STATE_S0;
@ -2011,7 +1995,6 @@ void rtw_unregister_cmd_alive(PADAPTER padapter)
struct pwrctrl_priv *pwrctrl; struct pwrctrl_priv *pwrctrl;
u8 pslv, i; u8 pslv, i;
pwrctrl = adapter_to_pwrctl(padapter); pwrctrl = adapter_to_pwrctl(padapter);
pslv = PS_STATE_S0; pslv = PS_STATE_S0;
@ -2063,14 +2046,12 @@ void rtw_unregister_rx_alive(PADAPTER padapter)
{ {
struct pwrctrl_priv *pwrctrl; struct pwrctrl_priv *pwrctrl;
pwrctrl = adapter_to_pwrctl(padapter); pwrctrl = adapter_to_pwrctl(padapter);
_enter_pwrlock(&pwrctrl->lock); _enter_pwrlock(&pwrctrl->lock);
unregister_task_alive(pwrctrl, RECV_ALIVE); unregister_task_alive(pwrctrl, RECV_ALIVE);
_exit_pwrlock(&pwrctrl->lock); _exit_pwrlock(&pwrctrl->lock);
} }
@ -2079,12 +2060,10 @@ void rtw_unregister_evt_alive(PADAPTER padapter)
{ {
struct pwrctrl_priv *pwrctrl; struct pwrctrl_priv *pwrctrl;
pwrctrl = adapter_to_pwrctl(padapter); pwrctrl = adapter_to_pwrctl(padapter);
unregister_task_alive(pwrctrl, EVT_ALIVE); unregister_task_alive(pwrctrl, EVT_ALIVE);
_exit_pwrlock(&pwrctrl->lock); _exit_pwrlock(&pwrctrl->lock);
} }
@ -2109,7 +2088,6 @@ void rtw_init_pwrctrl_priv(PADAPTER padapter)
return; return;
#endif #endif
#ifdef PLATFORM_WINDOWS #ifdef PLATFORM_WINDOWS
pwrctrlpriv->pnp_current_pwr_state = NdisDeviceStateD0; pwrctrlpriv->pnp_current_pwr_state = NdisDeviceStateD0;
#endif #endif
@ -2255,10 +2233,8 @@ void rtw_init_pwrctrl_priv(PADAPTER padapter)
rtw_hal_set_hwreg(padapter, HW_VAR_LPS_POFF_INIT, 0); rtw_hal_set_hwreg(padapter, HW_VAR_LPS_POFF_INIT, 0);
#endif #endif
} }
void rtw_free_pwrctrl_priv(PADAPTER adapter) void rtw_free_pwrctrl_priv(PADAPTER adapter)
{ {
struct pwrctrl_priv *pwrctrlpriv = adapter_to_pwrctl(adapter); struct pwrctrl_priv *pwrctrlpriv = adapter_to_pwrctl(adapter);
@ -2268,10 +2244,8 @@ void rtw_free_pwrctrl_priv(PADAPTER adapter)
return; return;
#endif #endif
/* _rtw_memset((unsigned char *)pwrctrlpriv, 0, sizeof(struct pwrctrl_priv)); */ /* _rtw_memset((unsigned char *)pwrctrlpriv, 0, sizeof(struct pwrctrl_priv)); */
#ifdef CONFIG_RESUME_IN_WORKQUEUE #ifdef CONFIG_RESUME_IN_WORKQUEUE
if (pwrctrlpriv->rtw_workqueue) { if (pwrctrlpriv->rtw_workqueue) {
flush_workqueue(pwrctrlpriv->rtw_workqueue); flush_workqueue(pwrctrlpriv->rtw_workqueue);
@ -2399,7 +2373,6 @@ void rtw_register_early_suspend(struct pwrctrl_priv *pwrpriv)
pwrpriv->early_suspend.resume = rtw_late_resume; pwrpriv->early_suspend.resume = rtw_late_resume;
register_early_suspend(&pwrpriv->early_suspend); register_early_suspend(&pwrpriv->early_suspend);
} }
void rtw_unregister_early_suspend(struct pwrctrl_priv *pwrpriv) void rtw_unregister_early_suspend(struct pwrctrl_priv *pwrpriv)
@ -2476,7 +2449,6 @@ u8 rtw_interface_ps_func(_adapter *padapter, HAL_INTF_PS_FUNC efunc_id, u8 *val)
return bResult; return bResult;
} }
inline void rtw_set_ips_deny(_adapter *padapter, u32 ms) inline void rtw_set_ips_deny(_adapter *padapter, u32 ms)
{ {
struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter); struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter);
@ -2509,7 +2481,6 @@ int _rtw_pwr_wakeup(_adapter *padapter, u32 ips_deffer_ms, const char *caller)
if (rtw_time_after(rtw_get_current_time() + rtw_ms_to_systime(ips_deffer_ms), pwrpriv->ips_deny_time)) if (rtw_time_after(rtw_get_current_time() + rtw_ms_to_systime(ips_deffer_ms), pwrpriv->ips_deny_time))
pwrpriv->ips_deny_time = rtw_get_current_time() + rtw_ms_to_systime(ips_deffer_ms); pwrpriv->ips_deny_time = rtw_get_current_time() + rtw_ms_to_systime(ips_deffer_ms);
if (pwrpriv->ps_processing) { if (pwrpriv->ps_processing) {
RTW_INFO("%s wait ps_processing...\n", __func__); RTW_INFO("%s wait ps_processing...\n", __func__);
while (pwrpriv->ps_processing && rtw_get_passing_time_ms(start) <= 3000) while (pwrpriv->ps_processing && rtw_get_passing_time_ms(start) <= 3000)