qcacld-3.0: Fix safe channel switch failure

For the AP+AP SCC LTE-Coex case, when channel avoidance event
is reported, the channel switch request for SAP will be blocked
by policy manager if the target channel is different with the
operating channel of the existing SAP due to the SCC policy.

Need to update the logic to give higher priority to the channel
avoidance request.

Another change is to move the dfs_radar_found ref counter from
hdd_ctx to hdd_adapter so that the channel switch request of
the 2nd SAP will not be blocked when the 1st one is still in
progress since it might take some time to get VDEV restart
response from FW.

Change-Id: I8594b35b70276f7ed3884697caf69a99ee91b952
CRs-Fixed: 2171958
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c
index 422afd1..d1ffa7b 100644
--- a/core/hdd/src/wlan_hdd_main.c
+++ b/core/hdd/src/wlan_hdd_main.c
@@ -7571,13 +7571,15 @@
  * hdd_switch_sap_channel() - Move SAP to the given channel
  * @adapter: AP adapter
  * @channel: Channel
+ * @forced: Force to switch channel, ignore SCC/MCC check
  *
  * Moves the SAP interface by invoking the function which
  * executes the callback to perform channel switch using (E)CSA.
  *
  * Return: None
  */
-void hdd_switch_sap_channel(struct hdd_adapter *adapter, uint8_t channel)
+void hdd_switch_sap_channel(struct hdd_adapter *adapter, uint8_t channel,
+			    bool forced)
 {
 	struct hdd_ap_ctx *hdd_ap_ctx;
 	tHalHandle *hal_handle;
@@ -7612,7 +7614,7 @@
 
 	policy_mgr_change_sap_channel_with_csa(hdd_ctx->hdd_psoc,
 		adapter->session_id, channel,
-		hdd_ap_ctx->sap_config.ch_width_orig);
+		hdd_ap_ctx->sap_config.ch_width_orig, forced);
 }
 
 int hdd_update_acs_timer_reason(struct hdd_adapter *adapter, uint8_t reason)
@@ -7717,7 +7719,8 @@
 			hdd_debug("driver to start sap: %d",
 				hdd_ctxt->config->sap_internal_restart);
 			if (hdd_ctxt->config->sap_internal_restart)
-				hdd_switch_sap_channel(adapter, restart_chan);
+				hdd_switch_sap_channel(adapter, restart_chan,
+						       true);
 			else
 				return;
 		}
@@ -7782,7 +7785,7 @@
 
 	wlan_hdd_send_svc_nlink_msg(hdd_ctx->radio_index,
 				    WLAN_SVC_LTE_COEX_IND, NULL, 0);
-	hdd_switch_sap_channel(adapter, restart_chan);
+	hdd_switch_sap_channel(adapter, restart_chan, true);
 }
 
 int hdd_clone_local_unsafe_chan(struct hdd_context *hdd_ctx,