|
@@ -3069,9 +3069,8 @@ qdf_freq_t wlansap_get_chan_band_restrict(struct sap_context *sap_ctx,
|
|
|
sap_debug("set 40M when switch SAP to 2G");
|
|
|
restart_ch_width = CH_WIDTH_40MHZ;
|
|
|
}
|
|
|
- } else if (sap_band == REG_BAND_2G && (band & BIT(REG_BAND_5G))) {
|
|
|
- if (sap_ctx->chan_freq_before_switch_band == 0)
|
|
|
- return 0;
|
|
|
+ } else if (sap_band == REG_BAND_2G && (band & BIT(REG_BAND_5G)) &&
|
|
|
+ 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;
|
|
|
sap_debug("Restore chan freq: %d, width: %d",
|