diff --git a/core/hdd/src/wlan_hdd_wext.c b/core/hdd/src/wlan_hdd_wext.c index 064dbdceb654..245519f8501d 100644 --- a/core/hdd/src/wlan_hdd_wext.c +++ b/core/hdd/src/wlan_hdd_wext.c @@ -7664,6 +7664,14 @@ static int __iw_set_var_ints_getnone(struct net_device *dev, { p2p_app_setP2pPs_t p2pNoA; + if (pAdapter->device_mode != WLAN_HDD_P2P_GO) { + hdd_err("Setting NoA is not allowed in Device mode %s(%d)", + hdd_device_mode_to_string( + pAdapter->device_mode), + pAdapter->device_mode); + return -EINVAL; + } + p2pNoA.opp_ps = apps_args[0]; p2pNoA.ctWindow = apps_args[1]; p2pNoA.duration = apps_args[2];