Browse Source

qcacld-3.0: Do not allow pre cac during CSA

After pre cac succeeds, driver triggers regulatory change
to user space then starts CSA process. As a result hostapd
triggers another pre cac to driver while SAP performs CSA,
this makes unexpected state in driver, therefore subsequent
pre cac will not be correctly performed.

To address this, reject the pre cac request during CSA.

Change-Id: I82187d64bf94d3bdfab84b873c2ab438a4037ea9
CRs-Fixed: 2859289
Bapiraju Alla 4 years ago
parent
commit
f73c0ba653
1 changed files with 5 additions and 0 deletions
  1. 5 0
      core/hdd/src/wlan_hdd_sap_cond_chan_switch.c

+ 5 - 0
core/hdd/src/wlan_hdd_sap_cond_chan_switch.c

@@ -200,6 +200,11 @@ static int __wlan_hdd_request_pre_cac(struct hdd_context *hdd_ctx,
 		return -EINVAL;
 	}
 
+	if (qdf_atomic_read(&ap_adapter->ch_switch_in_progress)) {
+		hdd_err("pre cac not allowed during CSA");
+		return -EINVAL;
+	}
+
 	mac_handle = hdd_ctx->mac_handle;
 	val = wlan_sap_is_pre_cac_active(mac_handle);
 	if (val) {