Procházet zdrojové kódy

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 před 6 roky
rodič
revize
ee6309f48a
1 změnil soubory, kde provedl 6 přidání a 2 odebrání
  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,
 		status = sme_ps_disable_auto_ps_timer(mac_handle,
 					adapter->session_id);
 					adapter->session_id);
+
 		if (status != QDF_STATUS_SUCCESS)
 		if (status != QDF_STATUS_SUCCESS)
 			goto end;
 			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:
 end: