From 91b7bb8a20df631bb98369eae823073252dad4d5 Mon Sep 17 00:00:00 2001 From: Manjeet Singh Date: Fri, 10 Feb 2017 18:35:40 +0530 Subject: [PATCH] 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 --- core/hdd/src/wlan_hdd_power.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/hdd/src/wlan_hdd_power.c b/core/hdd/src/wlan_hdd_power.c index 087735f1f088..51a58627a212 100644 --- a/core/hdd/src/wlan_hdd_power.c +++ b/core/hdd/src/wlan_hdd_power.c @@ -2217,6 +2217,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) {