summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManjeet Singh <manjee@codeaurora.org>2017-02-10 18:35:40 +0530
committerqcabuildsw <qcabuildsw@localhost>2017-02-15 12:48:37 -0800
commit63123805089ff718a37a508818a66effa35e95a3 (patch)
tree42cf276d50621ede61860f62c76a62234249ca28
parentc5cd810eaf26a9a565d9e017a1451b9437fbd8eb (diff)
qcacld-3.0: Enable QPOWER only for STA modes
Currently sending qpower to FW in softap mode causes device to crash as qpower config is not supported. Enable QPOWER config in STA and P2P-CLI modes. Change-Id: Idb8b3ac79e6c93533b752ac42d6ab57bb0c86579 CRs-Fixed: 2003839
-rw-r--r--core/hdd/src/wlan_hdd_power.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/core/hdd/src/wlan_hdd_power.c b/core/hdd/src/wlan_hdd_power.c
index 2df1d3d10d32..a47a40df1cf6 100644
--- a/core/hdd/src/wlan_hdd_power.c
+++ b/core/hdd/src/wlan_hdd_power.c
@@ -2476,6 +2476,12 @@ int hdd_set_qpower_config(hdd_context_t *hddctx, hdd_adapter_t *adapter,
hdd_err("qpower is disabled in configuration");
return -EINVAL;
}
+ if (adapter->device_mode != QDF_STA_MODE &&
+ adapter->device_mode != QDF_P2P_CLIENT_MODE) {
+ hdd_info(FL("QPOWER only allowed in STA/P2P-Client modes:%d "),
+ adapter->device_mode);
+ return -EINVAL;
+ }
if (qpower > PS_DUTY_CYCLING_QPOWER ||
qpower < PS_LEGACY_NODEEPSLEEP) {