qcacld-3.0: Do SAP CSA if bonded channels are disabled
Currently if STA+SAP SCC on a 6 GHz channel is present and host received SET_FCC_CHANNEL 0 command then host disables all 6 GHz channels except for STA connected channel. If SAP's bandwidth is greater than 20 MHz then kernel sends stop_ap as SAP bonded channels are disabled. To address this issue, do CSA to a non 6 GHz frequency. Change-Id: I89edf3c862c5b02f0eb5865428bdbb0d43d07f85 CRs-Fixed: 3563476
This commit is contained in:

committed by
Rahul Choudhary

parent
bbece0a981
commit
4a58eb1c4f
@@ -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;
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user