diff --git a/components/cmn_services/policy_mgr/src/wlan_policy_mgr_pcl.c b/components/cmn_services/policy_mgr/src/wlan_policy_mgr_pcl.c index 985655b341..9fc43552f5 100644 --- a/components/cmn_services/policy_mgr/src/wlan_policy_mgr_pcl.c +++ b/components/cmn_services/policy_mgr/src/wlan_policy_mgr_pcl.c @@ -1083,6 +1083,7 @@ policy_mgr_modify_sap_pcl_for_6G_channels(struct wlan_objmgr_psoc *psoc, qdf_freq_t sta_gc_6ghz_freq = 0; uint32_t ap_pwr_type_6g = 0; bool indoor_ch_support = false; + bool keep_6ghz_sta_cli_conn; pm_ctx = policy_mgr_get_context(psoc); if (!pm_ctx) { @@ -1130,10 +1131,12 @@ policy_mgr_modify_sap_pcl_for_6G_channels(struct wlan_objmgr_psoc *psoc, policy_mgr_debug("STA power type : %d", ap_pwr_type_6g); ucfg_mlme_get_indoor_channel_support(psoc, &indoor_ch_support); - + keep_6ghz_sta_cli_conn = wlan_reg_get_keep_6ghz_sta_cli_connection( + pm_ctx->pdev); for (i = 0; i < *pcl_len_org; i++) { if (WLAN_REG_IS_6GHZ_CHAN_FREQ(pcl_list_org[i])) { - if (!WLAN_REG_IS_6GHZ_PSC_CHAN_FREQ(pcl_list_org[i])) + if (!WLAN_REG_IS_6GHZ_PSC_CHAN_FREQ(pcl_list_org[i]) || + keep_6ghz_sta_cli_conn) continue; if (ap_pwr_type_6g == REG_VERY_LOW_POWER_AP) goto add_freq; diff --git a/core/sap/src/sap_module.c b/core/sap/src/sap_module.c index 1d2fb6feea..bb139cc801 100644 --- a/core/sap/src/sap_module.c +++ b/core/sap/src/sap_module.c @@ -3861,6 +3861,7 @@ qdf_freq_t wlansap_get_chan_band_restrict(struct sap_context *sap_ctx, enum band_info band; bool sta_sap_scc_on_indoor_channel; qdf_freq_t freq = 0; + struct ch_params ch_params = {0}; if (!sap_ctx) { sap_err("sap_ctx NULL parameter"); @@ -3975,11 +3976,26 @@ qdf_freq_t wlansap_get_chan_band_restrict(struct sap_context *sap_ctx, *csa_reason = CSA_REASON_UNSAFE_CHANNEL; return wlansap_get_safe_channel_from_pcl_and_acs_range(sap_ctx, NULL); + } else if (sap_band == REG_BAND_6G && + wlan_reg_get_keep_6ghz_sta_cli_connection(mac->pdev)) { + ch_params.ch_width = sap_ctx->ch_params.ch_width; + wlan_reg_set_channel_params_for_pwrmode(mac->pdev, + sap_ctx->chan_freq, + 0, &ch_params, + REG_CURRENT_PWR_MODE); + if (sap_ctx->ch_params.ch_width != ch_params.ch_width) { + sap_debug("Bonded 6GHz channels are disabled"); + *csa_reason = CSA_REASON_BAND_RESTRICTED; + return wlansap_get_safe_channel_from_pcl_and_acs_range( + sap_ctx, NULL); + } else { + sap_debug("No need switch SAP/Go channel"); + return 0; + } } else { sap_debug("No need switch SAP/Go channel"); return 0; } - cc_mode = sap_ctx->cc_switch_mode; phy_mode = sap_ctx->phyMode; vdev_id = wlan_vdev_get_id(sap_ctx->vdev);