qcacld-3.0: Do not restart PS timer if PS check fails
Power save checks for user configuration and STA connection state, if either of these fails then do not restart the auto power save timer. Change-Id: I83a337b828677464c74800adf690c00fda68fadc CRs-Fixed: 2112585
This commit is contained in:

committed by
pramod kotreshappa

parent
b7532358e5
commit
951bad85e6
@@ -966,24 +966,26 @@ QDF_STATUS sme_ps_open_per_session(tHalHandle hal_ctx, uint32_t session_id)
|
|||||||
void sme_auto_ps_entry_timer_expired(void *data)
|
void sme_auto_ps_entry_timer_expired(void *data)
|
||||||
{
|
{
|
||||||
struct ps_params *ps_params = (struct ps_params *)data;
|
struct ps_params *ps_params = (struct ps_params *)data;
|
||||||
tpAniSirGlobal mac_ctx = (tpAniSirGlobal)ps_params->mac_ctx;
|
tpAniSirGlobal mac_ctx;
|
||||||
uint32_t session_id = ps_params->session_id;
|
uint32_t session_id;
|
||||||
QDF_STATUS status;
|
QDF_STATUS status;
|
||||||
|
|
||||||
|
if (!ps_params) {
|
||||||
|
sme_err("ps_params is NULL");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
mac_ctx = (tpAniSirGlobal)ps_params->mac_ctx;
|
||||||
|
if (!mac_ctx) {
|
||||||
|
sme_err("mac_ctx is NULL");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
session_id = ps_params->session_id;
|
||||||
sme_debug("auto_ps_timer expired, enabling powersave");
|
sme_debug("auto_ps_timer expired, enabling powersave");
|
||||||
|
|
||||||
status = sme_enable_sta_ps_check(mac_ctx, session_id);
|
status = sme_enable_sta_ps_check(mac_ctx, session_id);
|
||||||
if (QDF_STATUS_SUCCESS == status)
|
if (QDF_STATUS_SUCCESS == status)
|
||||||
sme_ps_enable_disable((tHalHandle)mac_ctx, session_id,
|
sme_ps_enable_disable((tHalHandle)mac_ctx, session_id,
|
||||||
SME_PS_ENABLE);
|
SME_PS_ENABLE);
|
||||||
else {
|
|
||||||
sme_debug("failed to enable powersave, restarting timer");
|
|
||||||
status = qdf_mc_timer_start(&ps_params->auto_ps_enable_timer,
|
|
||||||
AUTO_PS_ENTRY_TIMER_DEFAULT_VALUE);
|
|
||||||
if (!QDF_IS_STATUS_SUCCESS(status)
|
|
||||||
&& (QDF_STATUS_E_ALREADY != status))
|
|
||||||
sme_err("Cannot start traffic timer");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QDF_STATUS sme_ps_close(tHalHandle hal_ctx)
|
QDF_STATUS sme_ps_close(tHalHandle hal_ctx)
|
||||||
|
Reference in New Issue
Block a user