|
@@ -1522,10 +1522,14 @@ int wlan_hdd_set_powersave(struct hdd_adapter *adapter,
|
|
|
*/
|
|
|
status = sme_ps_disable_auto_ps_timer(mac_handle,
|
|
|
adapter->session_id);
|
|
|
+
|
|
|
if (status != QDF_STATUS_SUCCESS)
|
|
|
goto end;
|
|
|
- status = sme_ps_enable_disable(mac_handle, adapter->session_id,
|
|
|
- SME_PS_DISABLE);
|
|
|
+
|
|
|
+ if (hdd_ctx->config && hdd_ctx->config->is_ps_enabled)
|
|
|
+ status = sme_ps_enable_disable(mac_handle,
|
|
|
+ adapter->session_id,
|
|
|
+ SME_PS_DISABLE);
|
|
|
}
|
|
|
|
|
|
end:
|