Browse Source

qcacld-3.0: When PS is disabled from INI, return success to kernel

If power-save is disabled then driver is returning failure to KERNEL
which causes framework and kernel to go out of sync and therefor
kernel doesn't accept any power-save enablement command from framework.

CRs-Fixed: 2357896
Change-Id: I36db68454f1ff6661563d021fc5b75b8161e8a78
Krunal Soni 6 years ago
parent
commit
ee6309f48a
1 changed files with 6 additions and 2 deletions
  1. 6 2
      core/hdd/src/wlan_hdd_power.c

+ 6 - 2
core/hdd/src/wlan_hdd_power.c

@@ -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: