From f64ab454a851bbaec9aa8de666cfd49ee0fdf488 Mon Sep 17 00:00:00 2001 From: Kiran Kumar Lokere Date: Wed, 9 Jun 2021 18:13:40 -0700 Subject: [PATCH] qcacmn: Fix the channel validity check for beacon/probe response Fix the channel validity check for DS param IE in beacon or probe response frames in scan. Change-Id: I17132d3d406b2953ad31dc6ab40b0158e21bc5c4 CRs-Fixed: 2960334 --- umac/scan/dispatcher/src/wlan_scan_utils_api.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/umac/scan/dispatcher/src/wlan_scan_utils_api.c b/umac/scan/dispatcher/src/wlan_scan_utils_api.c index fb3f7376aab7..290ef08f6681 100644 --- a/umac/scan/dispatcher/src/wlan_scan_utils_api.c +++ b/umac/scan/dispatcher/src/wlan_scan_utils_api.c @@ -969,16 +969,17 @@ util_scan_populate_bcn_ie_list(struct wlan_objmgr_pdev *pdev, if (ie->ie_len != WLAN_DS_PARAM_IE_MAX_LEN) return QDF_STATUS_E_INVAL; scan_params->ie_list.ds_param = (uint8_t *)ie; - chan_idx = - ((struct ds_ie *)ie)->cur_chan; + chan_idx = ((struct ds_ie *)ie)->cur_chan; *chan_freq = wlan_reg_chan_band_to_freq(pdev, chan_idx, band_mask); /* Drop if invalid freq */ if (scan_obj->drop_bcn_on_invalid_freq && - wlan_reg_is_disable_for_freq(pdev, *chan_freq)) { - scm_debug_rl(QDF_MAC_ADDR_FMT": Drop as invalid channel %d freq %d in DS IE", - QDF_MAC_ADDR_REF(scan_params->bssid.bytes), - chan_idx, *chan_freq); + !wlan_reg_is_freq_present_in_cur_chan_list(pdev, + *chan_freq)) { + scm_debug(QDF_MAC_ADDR_FMT": Drop as invalid chan %d in DS IE, freq %d, band_mask %d", + QDF_MAC_ADDR_REF( + scan_params->bssid.bytes), + chan_idx, *chan_freq, band_mask); return QDF_STATUS_E_INVAL; } break;