summaryrefslogtreecommitdiff
path: root/net/wireless/scan.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2021-05-08 16:03:51 +0300
committerJohannes Berg <johannes.berg@intel.com>2021-06-23 11:59:08 +0300
commit5b5c9f3bd5f3d726d07ab8e4776d241863963a6e (patch)
tree062c972454b4fae3474417a44166ab5708a356ee /net/wireless/scan.c
parent21b7805434f6598eaf70329f78cf3da0bd4aa3e9 (diff)
downloadlinux-5b5c9f3bd5f3d726d07ab8e4776d241863963a6e.tar.xz
cfg80211: clean up variable use in cfg80211_parse_colocated_ap()
The "ap_info->tbtt_info_len" and "length" variables are the same value but it is confusing how the names are mixed up. Let's use "length" everywhere for consistency. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/YJaMNzZENkYFAYQX@mwanda Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/scan.c')
-rw-r--r--net/wireless/scan.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/wireless/scan.c b/net/wireless/scan.c
index 4f06c1825029..a3941b19b516 100644
--- a/net/wireless/scan.c
+++ b/net/wireless/scan.c
@@ -618,7 +618,7 @@ static int cfg80211_parse_colocated_ap(const struct cfg80211_bss_ies *ies,
freq = ieee80211_channel_to_frequency(ap_info->channel, band);
- if (end - pos < count * ap_info->tbtt_info_len)
+ if (end - pos < count * length)
break;
/*
@@ -630,7 +630,7 @@ static int cfg80211_parse_colocated_ap(const struct cfg80211_bss_ies *ies,
if (band != NL80211_BAND_6GHZ ||
(length != IEEE80211_TBTT_INFO_OFFSET_BSSID_BSS_PARAM &&
length < IEEE80211_TBTT_INFO_OFFSET_BSSID_SSSID_BSS_PARAM)) {
- pos += count * ap_info->tbtt_info_len;
+ pos += count * length;
continue;
}
@@ -653,7 +653,7 @@ static int cfg80211_parse_colocated_ap(const struct cfg80211_bss_ies *ies,
kfree(entry);
}
- pos += ap_info->tbtt_info_len;
+ pos += length;
}
}