aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/nl80211.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2014-11-21 09:24:31 -0500
committerJohannes Berg <johannes.berg@intel.com>2014-11-25 03:57:27 -0500
commitea9eba6a8b6b5d7a48b902d92dc2adb63b4371c0 (patch)
tree6a169aea0871be69b286a47f560a7536e52ffb12 /net/wireless/nl80211.c
parent575f05302e6c75fcea8802a779359f8c927b516e (diff)
cfg80211: remove pointless channel lookup in survey code
We have a channel pointer, and we use its center frequency to look up a channel pointer - which will thus be exactly the same as the original pointer. Remove that pointless lookup and just use the pointer. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/nl80211.c')
-rw-r--r--net/wireless/nl80211.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 6e4177701d86..b5e3c489239d 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -6562,8 +6562,6 @@ static int nl80211_dump_survey(struct sk_buff *skb,
6562 } 6562 }
6563 6563
6564 while (1) { 6564 while (1) {
6565 struct ieee80211_channel *chan;
6566
6567 res = rdev_dump_survey(rdev, wdev->netdev, survey_idx, &survey); 6565 res = rdev_dump_survey(rdev, wdev->netdev, survey_idx, &survey);
6568 if (res == -ENOENT) 6566 if (res == -ENOENT)
6569 break; 6567 break;
@@ -6576,9 +6574,7 @@ static int nl80211_dump_survey(struct sk_buff *skb,
6576 goto out; 6574 goto out;
6577 } 6575 }
6578 6576
6579 chan = ieee80211_get_channel(&rdev->wiphy, 6577 if (survey.channel->flags & IEEE80211_CHAN_DISABLED) {
6580 survey.channel->center_freq);
6581 if (!chan || chan->flags & IEEE80211_CHAN_DISABLED) {
6582 survey_idx++; 6578 survey_idx++;
6583 continue; 6579 continue;
6584 } 6580 }