Browse Source

qcacmn: 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.

Change-Id: Ie42bab50c1fa92e4e8df9f1b0ce8b8f4f09551b5
CRs-Fixed: 2176250
Min Liu 7 years ago
parent
commit
f98b12e05f

+ 7 - 3
umac/cmn_services/policy_mgr/inc/wlan_policy_mgr_api.h

@@ -201,6 +201,7 @@ QDF_STATUS policy_mgr_change_mcc_go_beacon_interval(
  * @vdev_id: Vdev id
  * @channel: Channel to change
  * @ch_width: channel width to change
+ * @forced: Force to switch channel, ignore SCC/MCC check
  *
  * Invoke the callback function to change SAP channel using (E)CSA
  *
@@ -209,12 +210,14 @@ QDF_STATUS policy_mgr_change_mcc_go_beacon_interval(
 void policy_mgr_change_sap_channel_with_csa(
 		struct wlan_objmgr_psoc *psoc,
 		uint8_t vdev_id, uint32_t channel,
-		uint32_t ch_width);
+		uint32_t ch_width,
+		bool forced);
 #else
 static inline void policy_mgr_change_sap_channel_with_csa(
 		struct wlan_objmgr_psoc *psoc,
 		uint8_t vdev_id, uint32_t channel,
-		uint32_t ch_width)
+		uint32_t ch_width,
+		bool forced)
 {
 
 }
@@ -809,7 +812,8 @@ struct policy_mgr_sme_cbacks {
 struct policy_mgr_hdd_cbacks {
 	void (*sap_restart_chan_switch_cb)(struct wlan_objmgr_psoc *psoc,
 				uint8_t vdev_id, uint32_t channel,
-				uint32_t channel_bw);
+				uint32_t channel_bw,
+				bool forced);
 	QDF_STATUS (*wlan_hdd_get_channel_for_sap_restart)(
 				struct wlan_objmgr_psoc *psoc,
 				uint8_t vdev_id, uint8_t *channel,

+ 4 - 2
umac/cmn_services/policy_mgr/src/wlan_policy_mgr_action.c

@@ -904,6 +904,7 @@ void policy_mgr_check_concurrent_intf_and_restart_sap(
  * @vdev_id: Vdev id
  * @channel: Channel to change
  * @ch_width: channel width to change
+ * @forced: Force to switch channel, ignore SCC/MCC check
  *
  * Invoke the callback function to change SAP channel using (E)CSA
  *
@@ -911,7 +912,8 @@ void policy_mgr_check_concurrent_intf_and_restart_sap(
  */
 void policy_mgr_change_sap_channel_with_csa(struct wlan_objmgr_psoc *psoc,
 					    uint8_t vdev_id, uint32_t channel,
-					    uint32_t ch_width)
+					    uint32_t ch_width,
+					    bool forced)
 {
 	struct policy_mgr_psoc_priv_obj *pm_ctx;
 
@@ -924,7 +926,7 @@ void policy_mgr_change_sap_channel_with_csa(struct wlan_objmgr_psoc *psoc,
 	if (pm_ctx->hdd_cbacks.sap_restart_chan_switch_cb) {
 		policy_mgr_info("SAP change change without restart");
 		pm_ctx->hdd_cbacks.sap_restart_chan_switch_cb(psoc,
-				vdev_id, channel, ch_width);
+				vdev_id, channel, ch_width, forced);
 	}
 }
 #endif