diff options
author | Johannes Berg <johannes.berg@intel.com> | 2012-05-16 15:42:56 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2012-06-06 13:06:07 +0200 |
commit | 9dc216d740e1210ccb3da533e2dab99a156300f9 (patch) | |
tree | 13140a91875d6ac50c6721a1d9eea329f0cfe9cf /drivers/net/wireless/iwlwifi/iwl-scan.c | |
parent | 7ad580c2e6d918379b89668ea4e58a3599e27ee5 (diff) | |
download | op-kernel-dev-9dc216d740e1210ccb3da533e2dab99a156300f9.zip op-kernel-dev-9dc216d740e1210ccb3da533e2dab99a156300f9.tar.gz |
iwlwifi: trust mac80211 channel setting
mac80211 will never set, switch to, or scan on an
invalid channel, so remove the code to validate
the channels against the driver channel list.
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-scan.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-scan.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-scan.c b/drivers/net/wireless/iwlwifi/iwl-scan.c index eb0ded7..ea05ae8 100644 --- a/drivers/net/wireless/iwlwifi/iwl-scan.c +++ b/drivers/net/wireless/iwlwifi/iwl-scan.c @@ -534,7 +534,6 @@ static int iwl_get_channels_for_scan(struct iwl_priv *priv, { struct ieee80211_channel *chan; const struct ieee80211_supported_band *sband; - const struct iwl_channel_info *ch_info; u16 passive_dwell = 0; u16 active_dwell = 0; int added, i; @@ -559,16 +558,7 @@ static int iwl_get_channels_for_scan(struct iwl_priv *priv, channel = chan->hw_value; scan_ch->channel = cpu_to_le16(channel); - ch_info = iwl_get_channel_info(priv, band, channel); - if (!is_channel_valid(ch_info)) { - IWL_DEBUG_SCAN(priv, - "Channel %d is INVALID for this band.\n", - channel); - continue; - } - - if (!is_active || is_channel_passive(ch_info) || - (chan->flags & IEEE80211_CHAN_PASSIVE_SCAN)) + if (!is_active || (chan->flags & IEEE80211_CHAN_PASSIVE_SCAN)) scan_ch->type = SCAN_CHANNEL_TYPE_PASSIVE; else scan_ch->type = SCAN_CHANNEL_TYPE_ACTIVE; |