diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index 49a973a4b5..94db23cf02 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -26140,7 +26140,7 @@ static void wlan_hdd_chan_info_cb(struct scan_chan_info *info) return; } - for (idx = 0; idx < SIR_MAX_NUM_CHANNELS; idx++) { + for (idx = 0; idx < NUM_CHANNELS; idx++) { if (chan[idx].freq == info->freq) { hdd_update_chan_info(hdd_ctx, &chan[idx], info, info->cmd_flag); diff --git a/core/hdd/src/wlan_hdd_stats.c b/core/hdd/src/wlan_hdd_stats.c index a47fa6a3e3..c06010fcc4 100644 --- a/core/hdd/src/wlan_hdd_stats.c +++ b/core/hdd/src/wlan_hdd_stats.c @@ -7006,7 +7006,7 @@ static int __wlan_hdd_cfg80211_dump_survey(struct wiphy *wiphy, bool filled = false; if (idx > NUM_CHANNELS - 1) - return -EINVAL; + return -ENOENT; hdd_ctx = WLAN_HDD_GET_CTX(adapter); 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); if (!filled) - return -ENONET; + return -ENOENT; return 0; }