Commit 902d633a authored by Sreelakshmi Konamki's avatar Sreelakshmi Konamki Committed by Madan Mohan Koyyalamudi
Browse files

qcacld-2.0: Allow power save to be controlled by iw command

If gEnablePowerSaveOffload is 1 in ini, power save can't be
controlled by iw dev <devname> set power_save on/off.
Make configDefStaPsEnabled work only when configStaPsEnabled is
TRUE.

Change-Id: Ia00abb73efbb1425ef9a3862c1ea2a88506ffd9a
CRs-Fixed: 963894
parent 6ef6bb70
/*
* Copyright (c) 2012-2014 The Linux Foundation. All rights reserved.
* Copyright (c) 2012-2016 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
......@@ -3799,6 +3799,8 @@ eHalStatus PmcOffloadEnableStaModePowerSave(tHalHandle hHal,
if(!pmc->configStaPsEnabled)
{
eHalStatus status;
pmc->configStaPsEnabled = TRUE;
status = pmcOffloadEnableStaPsHandler(pMac, sessionId);
if((eHAL_STATUS_SUCCESS == status) ||
......@@ -3808,7 +3810,6 @@ eHalStatus PmcOffloadEnableStaModePowerSave(tHalHandle hHal,
smsLog(pMac, LOG2,
FL("Successfull Queued Enabling Sta Mode Ps Request"));
pmc->configStaPsEnabled = TRUE;
return eHAL_STATUS_SUCCESS;
}
else
......@@ -3840,8 +3841,9 @@ eHalStatus PmcOffloadDisableStaModePowerSave(tHalHandle hHal,
tpPsOffloadPerSessionInfo pmc = &pMac->pmcOffloadInfo.pmc[sessionId];
eHalStatus status = eHAL_STATUS_SUCCESS;
if(pmc->configStaPsEnabled)
{
if (pmc->configStaPsEnabled) {
pmc->configDefStaPsEnabled = FALSE;
status = pmcOffloadDisableStaPsHandler(pMac, sessionId);
}
else
......@@ -4330,6 +4332,13 @@ eHalStatus PmcOffloadEnableDeferredStaModePowerSave(tHalHandle hHal,
tpPsOffloadPerSessionInfo pmc = &pMac->pmcOffloadInfo.pmc[sessionId];
eHalStatus status = eHAL_STATUS_FAILURE;
if (!pmc->configStaPsEnabled)
{
smsLog(pMac, LOGE,
FL("STA Mode Config PowerSave is not enabled"));
return status;
}
if (!pMac->pmcOffloadInfo.staPsEnabled)
{
smsLog(pMac, LOGE,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment