|
@@ -754,6 +754,7 @@ QDF_STATUS wlansap_start_bss(struct sap_context *sap_ctx,
|
|
|
sap_ctx->isCacEndNotified = false;
|
|
|
sap_ctx->is_chan_change_inprogress = false;
|
|
|
sap_ctx->phyMode = config->SapHw_mode;
|
|
|
+ sap_ctx->csa_reason = CSA_REASON_UNKNOWN;
|
|
|
|
|
|
/* Set the BSSID to your "self MAC Addr" read the mac address
|
|
|
from Configuation ITEM received from HDD */
|
|
@@ -1215,6 +1216,21 @@ wlansap_get_target_eht_phy_ch_width(void)
|
|
|
}
|
|
|
#endif /* WLAN_FEATURE_11BE */
|
|
|
|
|
|
+static enum phy_ch_width
|
|
|
+wlansap_5g_original_bw_validate(
|
|
|
+ struct sap_context *sap_context,
|
|
|
+ uint32_t chan_freq,
|
|
|
+ enum phy_ch_width ch_width)
|
|
|
+{
|
|
|
+ if (sap_context->csa_reason != CSA_REASON_USER_INITIATED &&
|
|
|
+ WLAN_REG_IS_5GHZ_CH_FREQ(chan_freq) &&
|
|
|
+ ch_width >= CH_WIDTH_160MHZ &&
|
|
|
+ sap_context->ch_width_orig < CH_WIDTH_160MHZ)
|
|
|
+ ch_width = CH_WIDTH_80MHZ;
|
|
|
+
|
|
|
+ return ch_width;
|
|
|
+}
|
|
|
+
|
|
|
enum phy_ch_width
|
|
|
wlansap_get_csa_chanwidth_from_phymode(struct sap_context *sap_context,
|
|
|
uint32_t chan_freq,
|
|
@@ -1239,6 +1255,8 @@ wlansap_get_csa_chanwidth_from_phymode(struct sap_context *sap_context,
|
|
|
ch_width = CH_WIDTH_20MHZ;
|
|
|
} else {
|
|
|
ch_width = wlansap_get_max_bw_by_phymode(sap_context);
|
|
|
+ ch_width = wlansap_5g_original_bw_validate(
|
|
|
+ sap_context, chan_freq, ch_width);
|
|
|
concurrent_bw = wlan_sap_get_concurrent_bw(
|
|
|
mac->pdev, mac->psoc, chan_freq,
|
|
|
ch_width);
|
|
@@ -1252,11 +1270,13 @@ wlansap_get_csa_chanwidth_from_phymode(struct sap_context *sap_context,
|
|
|
ch_width = ch_params.ch_width;
|
|
|
if (tgt_ch_params)
|
|
|
*tgt_ch_params = ch_params;
|
|
|
- sap_nofl_debug("freq %d bw %d (phymode %d, con bw %d, tgt bw %d)",
|
|
|
+ sap_nofl_debug("csa freq %d bw %d (phymode %d con bw %d tgt bw %d orig %d reason %d)",
|
|
|
chan_freq, ch_width,
|
|
|
sap_context->phyMode,
|
|
|
concurrent_bw,
|
|
|
- tgt_ch_params ? tgt_ch_params->ch_width : CH_WIDTH_MAX);
|
|
|
+ tgt_ch_params ? tgt_ch_params->ch_width : CH_WIDTH_MAX,
|
|
|
+ sap_context->ch_width_orig,
|
|
|
+ sap_context->csa_reason);
|
|
|
|
|
|
return ch_width;
|
|
|
}
|