From 8a14dd91ed62ef52d7cb8b1af7e93eeb51755a1e Mon Sep 17 00:00:00 2001 From: Bapiraju Alla Date: Wed, 6 May 2020 20:47:37 +0530 Subject: [PATCH] qcacld-3.0: Reject SAP concurrency with monitor mode Currently, SAP interface is being created when there is an existing monitor mode interface. This concurrency is not allowed. To avoid this, Add check for existing monitor mode interface before creating SAP interface using add virtual interface. Change-Id: Ia2318b880adaff39b7deb9e223140906e80a91ae CRs-Fixed: 2680143 --- core/hdd/src/wlan_hdd_p2p.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/hdd/src/wlan_hdd_p2p.c b/core/hdd/src/wlan_hdd_p2p.c index 145c217f6757..1674634e33fa 100644 --- a/core/hdd/src/wlan_hdd_p2p.c +++ b/core/hdd/src/wlan_hdd_p2p.c @@ -644,6 +644,11 @@ struct wireless_dev *__wlan_hdd_add_virtual_intf(struct wiphy *wiphy, return ERR_PTR(-EINVAL); } + if (cds_get_conparam() == QDF_GLOBAL_MONITOR_MODE) { + hdd_err("Concurrency not allowed with standalone monitor mode"); + return ERR_PTR(-EINVAL); + } + ret = wlan_hdd_validate_context(hdd_ctx); if (ret) return ERR_PTR(ret);