aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwmc3200wifi
diff options
context:
space:
mode:
authorBruno Randolf <br1@einfach.org>2011-01-16 23:37:28 -0500
committerJohn W. Linville <linville@tuxdriver.com>2011-01-21 15:34:17 -0500
commit59eb21a6504731fc16db4cf9463065dd61093e08 (patch)
tree4a3732d451c85a5949c6d6294db51a56530677d8 /drivers/net/wireless/iwmc3200wifi
parent60f2d1d506195803fa6e1dcf3972637b740fdd60 (diff)
cfg80211: Extend channel to frequency mapping for 802.11j
Extend channel to frequency mapping for 802.11j Japan 4.9GHz band, according to IEEE802.11 section 17.3.8.3.2 and Annex J. Because there are now overlapping channel numbers in the 2GHz and 5GHz band we can't map from channel to frequency without knowing the band. This is no problem as in most contexts we know the band. In places where we don't know the band (and WEXT compatibility) we assume the 2GHz band for channels below 14. This patch does not implement all channel to frequency mappings defined in 802.11, it's just an extension for 802.11j 20MHz channels. 5MHz and 10MHz channels as well as 802.11y channels have been omitted. The following drivers have been updated to reflect the API changes: iwl-3945, iwl-agn, iwmc3200wifi, libertas, mwl8k, rt2x00, wl1251, wl12xx. The drivers have been compile-tested only. Signed-off-by: Bruno Randolf <br1@einfach.org> Signed-off-by: Brian Prodoehl <bprodoehl@gmail.com> Acked-by: Luciano Coelho <coelho@ti.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwmc3200wifi')
-rw-r--r--drivers/net/wireless/iwmc3200wifi/cfg80211.c3
-rw-r--r--drivers/net/wireless/iwmc3200wifi/rx.c7
2 files changed, 7 insertions, 3 deletions
diff --git a/drivers/net/wireless/iwmc3200wifi/cfg80211.c b/drivers/net/wireless/iwmc3200wifi/cfg80211.c
index 5a4982271e96..ed57e4402800 100644
--- a/drivers/net/wireless/iwmc3200wifi/cfg80211.c
+++ b/drivers/net/wireless/iwmc3200wifi/cfg80211.c
@@ -287,7 +287,8 @@ int iwm_cfg80211_inform_bss(struct iwm_priv *iwm)
287 return -EINVAL; 287 return -EINVAL;
288 } 288 }
289 289
290 freq = ieee80211_channel_to_frequency(umac_bss->channel); 290 freq = ieee80211_channel_to_frequency(umac_bss->channel,
291 band->band);
291 channel = ieee80211_get_channel(wiphy, freq); 292 channel = ieee80211_get_channel(wiphy, freq);
292 signal = umac_bss->rssi * 100; 293 signal = umac_bss->rssi * 100;
293 294
diff --git a/drivers/net/wireless/iwmc3200wifi/rx.c b/drivers/net/wireless/iwmc3200wifi/rx.c
index a944893ae3ca..9a57cf6a488f 100644
--- a/drivers/net/wireless/iwmc3200wifi/rx.c
+++ b/drivers/net/wireless/iwmc3200wifi/rx.c
@@ -543,7 +543,10 @@ static int iwm_mlme_assoc_complete(struct iwm_priv *iwm, u8 *buf,
543 switch (le32_to_cpu(complete->status)) { 543 switch (le32_to_cpu(complete->status)) {
544 case UMAC_ASSOC_COMPLETE_SUCCESS: 544 case UMAC_ASSOC_COMPLETE_SUCCESS:
545 chan = ieee80211_get_channel(wiphy, 545 chan = ieee80211_get_channel(wiphy,
546 ieee80211_channel_to_frequency(complete->channel)); 546 ieee80211_channel_to_frequency(complete->channel,
547 complete->band == UMAC_BAND_2GHZ ?
548 IEEE80211_BAND_2GHZ :
549 IEEE80211_BAND_5GHZ));
547 if (!chan || chan->flags & IEEE80211_CHAN_DISABLED) { 550 if (!chan || chan->flags & IEEE80211_CHAN_DISABLED) {
548 /* Associated to a unallowed channel, disassociate. */ 551 /* Associated to a unallowed channel, disassociate. */
549 __iwm_invalidate_mlme_profile(iwm); 552 __iwm_invalidate_mlme_profile(iwm);
@@ -841,7 +844,7 @@ static int iwm_mlme_update_bss_table(struct iwm_priv *iwm, u8 *buf,
841 goto err; 844 goto err;
842 } 845 }
843 846
844 freq = ieee80211_channel_to_frequency(umac_bss->channel); 847 freq = ieee80211_channel_to_frequency(umac_bss->channel, band->band);
845 channel = ieee80211_get_channel(wiphy, freq); 848 channel = ieee80211_get_channel(wiphy, freq);
846 signal = umac_bss->rssi * 100; 849 signal = umac_bss->rssi * 100;
847 850