Commit ea9eba6a authored by Johannes Berg's avatar Johannes Berg

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: default avatarJohannes Berg <johannes.berg@intel.com>
parent 575f0530
...@@ -6562,8 +6562,6 @@ static int nl80211_dump_survey(struct sk_buff *skb, ...@@ -6562,8 +6562,6 @@ static int nl80211_dump_survey(struct sk_buff *skb,
} }
while (1) { while (1) {
struct ieee80211_channel *chan;
res = rdev_dump_survey(rdev, wdev->netdev, survey_idx, &survey); res = rdev_dump_survey(rdev, wdev->netdev, survey_idx, &survey);
if (res == -ENOENT) if (res == -ENOENT)
break; break;
...@@ -6576,9 +6574,7 @@ static int nl80211_dump_survey(struct sk_buff *skb, ...@@ -6576,9 +6574,7 @@ static int nl80211_dump_survey(struct sk_buff *skb,
goto out; goto out;
} }
chan = ieee80211_get_channel(&rdev->wiphy, if (survey.channel->flags & IEEE80211_CHAN_DISABLED) {
survey.channel->center_freq);
if (!chan || chan->flags & IEEE80211_CHAN_DISABLED) {
survey_idx++; survey_idx++;
continue; continue;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment