Explorar o código

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
Jianmin Zhu %!s(int64=6) %!d(string=hai) anos
pai
achega
54cfab35b7
Modificáronse 1 ficheiros con 10 adicións e 0 borrados
  1. 10 0
      core/hdd/src/wlan_hdd_hostapd.c

+ 10 - 0
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");