wlan: Do not allow NoA setting in non P2P GO mode
qcacld-2.0 to prima propagation
- FW asserts after receiving P2P NOA parameter in non P2P GO mode
- Add P2P GO mode check in set NOA IOCTL and do not allow this command
in non P2P GO modes
Change-Id: Ie786dcf33fc50eacadb407d74ae5638da68cf0d2
CRs-Fixed: 919889
diff --git a/CORE/HDD/src/wlan_hdd_wext.c b/CORE/HDD/src/wlan_hdd_wext.c
index fed4041..bba8bca 100644
--- a/CORE/HDD/src/wlan_hdd_wext.c
+++ b/CORE/HDD/src/wlan_hdd_wext.c
@@ -7324,6 +7324,13 @@
{
p2p_app_setP2pPs_t p2pNoA;
+ if (pAdapter->device_mode != WLAN_HDD_P2P_GO) {
+ hddLog(LOGE,
+ FL("Setting NoA is not allowed in Device mode:%d"),
+ pAdapter->device_mode);
+ return -EINVAL;
+ }
+
p2pNoA.opp_ps = apps_args[0];
p2pNoA.ctWindow = apps_args[1];
p2pNoA.duration = apps_args[2];