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
This commit is contained in:
Kiran Kumar Lokere 2021-06-09 18:13:40 -07:00 • committed by Madan Koyyalamudi
commit f64ab454a8

View file

@ -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;