From 54cfab35b7fd5ce40d1d74fe9b2ba5598d46484c Mon Sep 17 00:00:00 2001 From: Jianmin Zhu Date: Thu, 9 Aug 2018 10:04:32 +0800 Subject: [PATCH] qcacld-3.0: Do concurrency check when change SAP channel by iwprv After bring up SAP(2G)+SAP(5G) DBS mode, initiate CSA on SAP2 from 5G to 2G (DBS mode to SCC mode) with cmd: iwpriv wlan1 setChanChange X assert will happen. Fix: SAP+SAP on same band on Helium is not PORed case yet, Do concurrency check for path: iwpriv wlan0 setChanChange X. Change-Id: Iacd6f2b4c49f4bb52739f602e7ba1e8cd9be04bc CRs-Fixed: 2289366 --- core/hdd/src/wlan_hdd_hostapd.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c index a1ce6add97e5..a4255aaafc34 100644 --- a/core/hdd/src/wlan_hdd_hostapd.c +++ b/core/hdd/src/wlan_hdd_hostapd.c @@ -2725,6 +2725,16 @@ int hdd_softap_set_channel_change(struct net_device *dev, int target_channel, return -EBUSY; } + if (!policy_mgr_allow_concurrency( + hdd_ctx->hdd_psoc, + policy_mgr_convert_device_mode_to_qdf_type( + adapter->device_mode), + target_channel, + HW_MODE_20_MHZ)) { + hdd_err("Channel switch failed due to concurrency check failure"); + return -EINVAL; + } + status = policy_mgr_reset_chan_switch_complete_evt(hdd_ctx->hdd_psoc); if (!QDF_IS_STATUS_SUCCESS(status)) { hdd_err("clear event failed");