Просмотр исходного кода

qcacmn: Move SAP to safe channel after STA disconnection

Standalone SAP is not allowed on lte-coex channel if STA+SAP SCC
enabled on lte-coex channel. So move the SAP to a safe channel
once STA disconnected.

Change-Id: I00682f5bbb3da772e3e26ccd8d08183be28cc9ec
CRs-Fixed: 2265263
Jianmin Zhu 6 лет назад
Родитель
Сommit
e0abd264db

+ 1 - 1
umac/cmn_services/policy_mgr/inc/wlan_policy_mgr_api.h

@@ -2445,7 +2445,7 @@ void policy_mgr_update_user_config_sap_chan(
  *
  * Check if SAP should be moved to a non dfs channel after STA disconnection.
  * This API applicable only for STA+SAP SCC and ini 'sta_sap_scc_on_dfs_chan'
- * is enabled.
+ * or 'sta_sap_scc_on_lte_coex_chan' is enabled.
  *
  * Return: true if sap restart is required, otherwise false
  */

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

@@ -853,10 +853,12 @@ bool policy_mgr_is_sap_restart_required_after_sta_disconnect(
 	policy_mgr_debug("sta_sap_scc_on_dfs_chan %u, sap_chan %u",
 			 sta_sap_scc_on_dfs_chan, sap_chan);
 
-	if (!sta_sap_scc_on_dfs_chan ||
-	    !(sap_chan && WLAN_REG_IS_5GHZ_CH(sap_chan) &&
-	     (wlan_reg_get_channel_state(pm_ctx->pdev, sap_chan) ==
-	      CHANNEL_STATE_DFS))) {
+	if ((!sta_sap_scc_on_dfs_chan ||
+	     !(sap_chan && WLAN_REG_IS_5GHZ_CH(sap_chan) &&
+	       (wlan_reg_get_channel_state(pm_ctx->pdev, sap_chan) ==
+			CHANNEL_STATE_DFS))) &&
+	    (!policy_mgr_sta_sap_scc_on_lte_coex_chan(psoc) ||
+	      policy_mgr_is_safe_channel(psoc, sap_chan))) {
 		return false;
 	}
 
@@ -1100,6 +1102,9 @@ void policy_mgr_check_concurrent_intf_and_restart_sap(
 		 * If STA+SAP sessions are on DFS channel and STA+SAP SCC is
 		 * enabled on DFS channel then move the SAP out of DFS channel
 		 * as soon as STA gets disconnect.
+		 * If STA+SAP sessions are on unsafe channel and STA+SAP SCC is
+		 * enabled on unsafe channel then move the SAP to safe channel
+		 * as soon as STA disconnected.
 		 */
 		if (policy_mgr_is_sap_restart_required_after_sta_disconnect(
 							psoc, &sap_ch)) {