diff options
Diffstat (limited to 'net/mac80211/ibss.c')
-rw-r--r-- | net/mac80211/ibss.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c index e458ca0dffec..06d28787945b 100644 --- a/net/mac80211/ibss.c +++ b/net/mac80211/ibss.c | |||
@@ -991,7 +991,6 @@ static void ieee80211_rx_bss_info(struct ieee80211_sub_if_data *sdata, | |||
991 | struct ieee802_11_elems *elems) | 991 | struct ieee802_11_elems *elems) |
992 | { | 992 | { |
993 | struct ieee80211_local *local = sdata->local; | 993 | struct ieee80211_local *local = sdata->local; |
994 | int freq; | ||
995 | struct cfg80211_bss *cbss; | 994 | struct cfg80211_bss *cbss; |
996 | struct ieee80211_bss *bss; | 995 | struct ieee80211_bss *bss; |
997 | struct sta_info *sta; | 996 | struct sta_info *sta; |
@@ -1003,15 +1002,8 @@ static void ieee80211_rx_bss_info(struct ieee80211_sub_if_data *sdata, | |||
1003 | struct ieee80211_supported_band *sband = local->hw.wiphy->bands[band]; | 1002 | struct ieee80211_supported_band *sband = local->hw.wiphy->bands[band]; |
1004 | bool rates_updated = false; | 1003 | bool rates_updated = false; |
1005 | 1004 | ||
1006 | if (elems->ds_params) | 1005 | channel = ieee80211_get_channel(local->hw.wiphy, rx_status->freq); |
1007 | freq = ieee80211_channel_to_frequency(elems->ds_params[0], | 1006 | if (!channel) |
1008 | band); | ||
1009 | else | ||
1010 | freq = rx_status->freq; | ||
1011 | |||
1012 | channel = ieee80211_get_channel(local->hw.wiphy, freq); | ||
1013 | |||
1014 | if (!channel || channel->flags & IEEE80211_CHAN_DISABLED) | ||
1015 | return; | 1007 | return; |
1016 | 1008 | ||
1017 | if (sdata->vif.type == NL80211_IFTYPE_ADHOC && | 1009 | if (sdata->vif.type == NL80211_IFTYPE_ADHOC && |