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) {