qcacld-3.0: Add check in wlansap_get_chan_band_restrict()

Add check if sap_ctx->chan_freq_before_switch_band is valid
active channel for that country. If yes, the chan_freq_before_switch_band
channel can be used for new CC, otherwise host should skip the
chan_freq_before_switch_band.

Change-Id: I4ac2fee1dd584abba0708c2b7ef0826f384acb2d
CRs-Fixed: 3136454
This commit is contained in:
Deeksha Gupta
2022-02-24 11:47:44 +05:30
committed by Madan Koyyalamudi
parent ec1ea2c2b6
commit 11a20da787

View File

@@ -3232,7 +3232,9 @@ qdf_freq_t wlansap_get_chan_band_restrict(struct sap_context *sap_ctx,
restart_ch_width = CH_WIDTH_40MHZ; restart_ch_width = CH_WIDTH_40MHZ;
} }
} else if (sap_band == REG_BAND_2G && (band & BIT(REG_BAND_5G)) && } else if (sap_band == REG_BAND_2G && (band & BIT(REG_BAND_5G)) &&
sap_ctx->chan_freq_before_switch_band) { sap_ctx->chan_freq_before_switch_band &&
wlan_reg_is_enable_in_secondary_list_for_freq(mac->pdev,
sap_ctx->chan_freq_before_switch_band)) {
restart_freq = sap_ctx->chan_freq_before_switch_band; restart_freq = sap_ctx->chan_freq_before_switch_band;
restart_ch_width = sap_ctx->chan_width_before_switch_band; restart_ch_width = sap_ctx->chan_width_before_switch_band;
sap_debug("Restore chan freq: %d, width: %d", sap_debug("Restore chan freq: %d, width: %d",