|
@@ -3210,6 +3210,7 @@ static QDF_STATUS sap_get_channel_list(struct sap_context *sap_ctx,
|
|
#endif
|
|
#endif
|
|
tpAniSirGlobal mac_ctx = PMAC_STRUCT(hal);
|
|
tpAniSirGlobal mac_ctx = PMAC_STRUCT(hal);
|
|
tSapChSelSpectInfo spect_info_obj = { NULL, 0 };
|
|
tSapChSelSpectInfo spect_info_obj = { NULL, 0 };
|
|
|
|
+ uint16_t ch_width;
|
|
|
|
|
|
if (NULL == hal) {
|
|
if (NULL == hal) {
|
|
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
|
|
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
|
|
@@ -3221,10 +3222,11 @@ static QDF_STATUS sap_get_channel_list(struct sap_context *sap_ctx,
|
|
|
|
|
|
start_ch_num = sap_ctx->acs_cfg->start_ch;
|
|
start_ch_num = sap_ctx->acs_cfg->start_ch;
|
|
end_ch_num = sap_ctx->acs_cfg->end_ch;
|
|
end_ch_num = sap_ctx->acs_cfg->end_ch;
|
|
|
|
+ ch_width = sap_ctx->acs_cfg->ch_width;
|
|
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO,
|
|
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO,
|
|
- FL("startChannel %d, EndChannel %d, HW:%d"),
|
|
|
|
- start_ch_num, end_ch_num,
|
|
|
|
- sap_ctx->acs_cfg->hw_mode);
|
|
|
|
|
|
+ FL("startChannel %d, EndChannel %d, ch_width %d, HW:%d"),
|
|
|
|
+ start_ch_num, end_ch_num, ch_width,
|
|
|
|
+ sap_ctx->acs_cfg->hw_mode);
|
|
|
|
|
|
wlansap_extend_to_acs_range(hal, &start_ch_num, &end_ch_num,
|
|
wlansap_extend_to_acs_range(hal, &start_ch_num, &end_ch_num,
|
|
&band_start_ch, &band_end_ch);
|
|
&band_start_ch, &band_end_ch);
|
|
@@ -3287,6 +3289,26 @@ static QDF_STATUS sap_get_channel_list(struct sap_context *sap_ctx,
|
|
sap_ctx, &spect_info_obj))
|
|
sap_ctx, &spect_info_obj))
|
|
continue;
|
|
continue;
|
|
|
|
|
|
|
|
+ /*
|
|
|
|
+ * If we have any 5Ghz channel in the channel list
|
|
|
|
+ * and bw is 40/80/160 Mhz then we don't want SAP to
|
|
|
|
+ * come up in 2.4Ghz as for 40Mhz, 2.4Ghz channel is
|
|
|
|
+ * not preferred and 80/160Mhz is not allowed for 2.4Ghz
|
|
|
|
+ * band. So, don't even scan on 2.4Ghz channels if bw is
|
|
|
|
+ * 40/80/160Mhz and channel list has any 5Ghz channel.
|
|
|
|
+ */
|
|
|
|
+ if (end_ch_num >= WLAN_REG_CH_NUM(CHAN_ENUM_36) &&
|
|
|
|
+ ((ch_width == CH_WIDTH_40MHZ) ||
|
|
|
|
+ (ch_width == CH_WIDTH_80MHZ) ||
|
|
|
|
+ (ch_width == CH_WIDTH_80P80MHZ) ||
|
|
|
|
+ (ch_width == CH_WIDTH_160MHZ))) {
|
|
|
|
+ if (WLAN_REG_CH_NUM(loop_count) >=
|
|
|
|
+ WLAN_REG_CH_NUM(CHAN_ENUM_1) &&
|
|
|
|
+ WLAN_REG_CH_NUM(loop_count) <=
|
|
|
|
+ WLAN_REG_CH_NUM(CHAN_ENUM_14))
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
|
|
+
|
|
#ifdef FEATURE_WLAN_CH_AVOID
|
|
#ifdef FEATURE_WLAN_CH_AVOID
|
|
for (i = 0; i < NUM_CHANNELS; i++) {
|
|
for (i = 0; i < NUM_CHANNELS; i++) {
|
|
if (safe_channels[i].channelNumber ==
|
|
if (safe_channels[i].channelNumber ==
|