diff options
Diffstat (limited to 'net/mac80211/scan.c')
-rw-r--r-- | net/mac80211/scan.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c index 8e9bb168b73b..f3340279aba3 100644 --- a/net/mac80211/scan.c +++ b/net/mac80211/scan.c | |||
@@ -174,7 +174,6 @@ void ieee80211_scan_rx(struct ieee80211_local *local, struct sk_buff *skb) | |||
174 | u8 *elements; | 174 | u8 *elements; |
175 | struct ieee80211_channel *channel; | 175 | struct ieee80211_channel *channel; |
176 | size_t baselen; | 176 | size_t baselen; |
177 | int freq; | ||
178 | bool beacon; | 177 | bool beacon; |
179 | struct ieee802_11_elems elems; | 178 | struct ieee802_11_elems elems; |
180 | 179 | ||
@@ -209,13 +208,7 @@ void ieee80211_scan_rx(struct ieee80211_local *local, struct sk_buff *skb) | |||
209 | 208 | ||
210 | ieee802_11_parse_elems(elements, skb->len - baselen, &elems); | 209 | ieee802_11_parse_elems(elements, skb->len - baselen, &elems); |
211 | 210 | ||
212 | if (elems.ds_params && elems.ds_params_len == 1) | 211 | channel = ieee80211_get_channel(local->hw.wiphy, rx_status->freq); |
213 | freq = ieee80211_channel_to_frequency(elems.ds_params[0], | ||
214 | rx_status->band); | ||
215 | else | ||
216 | freq = rx_status->freq; | ||
217 | |||
218 | channel = ieee80211_get_channel(local->hw.wiphy, freq); | ||
219 | 212 | ||
220 | if (!channel || channel->flags & IEEE80211_CHAN_DISABLED) | 213 | if (!channel || channel->flags & IEEE80211_CHAN_DISABLED) |
221 | return; | 214 | return; |