qcacld-3.0: Report scan info for total NUM_CHANNELS to upper layer

Host allows scan for any channels allowed in the 2 GHz band or
channels allowed in the 5 GHz band or channels allowed in the 6 GHz
band. So the total number of frequencies allowed for the scan is
MAX_CHANNEL (NUM_CHANNELS - 1) defined in enum channel_enum.

Currently on receiving WMI_CHAN_INFO_EVENTID per channel, host
updates the channel info buffer for SIR_MAX_NUM_CHANNELS(64) only.
This result host fails to send channel info for frequencies present
at index MAX_CHANNEL - SIR_MAX_NUM_CHANNELS.

The fix is to allow the host to fill the channel info buffer till
the max allowed (MAX_CHANNEL) channel index.

Change-Id: Ic366d9fc832f06b096b934815464689d6279ec43
CRs-Fixed: 3502553
This commit is contained in:
abhinav kumar
2023-05-18 21:09:43 +05:30
committed by Rahul Choudhary
parent 966ceefe89
commit 2c3cec439d
2 changed files with 3 additions and 3 deletions

View File

@@ -26140,7 +26140,7 @@ static void wlan_hdd_chan_info_cb(struct scan_chan_info *info)
return; return;
} }
for (idx = 0; idx < SIR_MAX_NUM_CHANNELS; idx++) { for (idx = 0; idx < NUM_CHANNELS; idx++) {
if (chan[idx].freq == info->freq) { if (chan[idx].freq == info->freq) {
hdd_update_chan_info(hdd_ctx, &chan[idx], info, hdd_update_chan_info(hdd_ctx, &chan[idx], info,
info->cmd_flag); info->cmd_flag);

View File

@@ -7006,7 +7006,7 @@ static int __wlan_hdd_cfg80211_dump_survey(struct wiphy *wiphy,
bool filled = false; bool filled = false;
if (idx > NUM_CHANNELS - 1) if (idx > NUM_CHANNELS - 1)
return -EINVAL; return -ENOENT;
hdd_ctx = WLAN_HDD_GET_CTX(adapter); hdd_ctx = WLAN_HDD_GET_CTX(adapter);
status = wlan_hdd_validate_context(hdd_ctx); status = wlan_hdd_validate_context(hdd_ctx);
@@ -7034,7 +7034,7 @@ static int __wlan_hdd_cfg80211_dump_survey(struct wiphy *wiphy,
filled = wlan_hdd_update_survey_info(wiphy, adapter, survey, idx); filled = wlan_hdd_update_survey_info(wiphy, adapter, survey, idx);
if (!filled) if (!filled)
return -ENONET; return -ENOENT;
return 0; return 0;
} }