diff options
author | Felix Fietkau <nbd@openwrt.org> | 2010-10-14 10:02:39 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-10-15 15:48:45 -0400 |
commit | d4659912b557e9f68c0ad8be14e2cafd3210dd16 (patch) | |
tree | 5bd3dbc2b7ba736ff1dc0717154e7b592a22c32f /drivers/net/wireless/ath/ath9k/init.c | |
parent | 4e9900180eb72b3b22fc9742999045b11607eb24 (diff) |
ath9k_hw: remove enum wireless_mode and its users
The wireless mode bitfield was only used to detect 2.4 and 5 GHz support,
which can be simplified by using ATH9K_HW_CAP_* capabilities.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/init.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/init.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c index a4c5ed41b176..bc6c4df9712c 100644 --- a/drivers/net/wireless/ath/ath9k/init.c +++ b/drivers/net/wireless/ath/ath9k/init.c | |||
@@ -485,7 +485,7 @@ static int ath9k_init_channels_rates(struct ath_softc *sc) | |||
485 | ARRAY_SIZE(ath9k_5ghz_chantable) != | 485 | ARRAY_SIZE(ath9k_5ghz_chantable) != |
486 | ATH9K_NUM_CHANNELS); | 486 | ATH9K_NUM_CHANNELS); |
487 | 487 | ||
488 | if (test_bit(ATH9K_MODE_11G, sc->sc_ah->caps.wireless_modes)) { | 488 | if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_2GHZ) { |
489 | channels = kmemdup(ath9k_2ghz_chantable, | 489 | channels = kmemdup(ath9k_2ghz_chantable, |
490 | sizeof(ath9k_2ghz_chantable), GFP_KERNEL); | 490 | sizeof(ath9k_2ghz_chantable), GFP_KERNEL); |
491 | if (!channels) | 491 | if (!channels) |
@@ -500,7 +500,7 @@ static int ath9k_init_channels_rates(struct ath_softc *sc) | |||
500 | ARRAY_SIZE(ath9k_legacy_rates); | 500 | ARRAY_SIZE(ath9k_legacy_rates); |
501 | } | 501 | } |
502 | 502 | ||
503 | if (test_bit(ATH9K_MODE_11A, sc->sc_ah->caps.wireless_modes)) { | 503 | if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_5GHZ) { |
504 | channels = kmemdup(ath9k_5ghz_chantable, | 504 | channels = kmemdup(ath9k_5ghz_chantable, |
505 | sizeof(ath9k_5ghz_chantable), GFP_KERNEL); | 505 | sizeof(ath9k_5ghz_chantable), GFP_KERNEL); |
506 | if (!channels) { | 506 | if (!channels) { |
@@ -681,17 +681,17 @@ void ath9k_set_hw_capab(struct ath_softc *sc, struct ieee80211_hw *hw) | |||
681 | hw->rate_control_algorithm = "ath9k_rate_control"; | 681 | hw->rate_control_algorithm = "ath9k_rate_control"; |
682 | #endif | 682 | #endif |
683 | 683 | ||
684 | if (test_bit(ATH9K_MODE_11G, sc->sc_ah->caps.wireless_modes)) | 684 | if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_2GHZ) |
685 | hw->wiphy->bands[IEEE80211_BAND_2GHZ] = | 685 | hw->wiphy->bands[IEEE80211_BAND_2GHZ] = |
686 | &sc->sbands[IEEE80211_BAND_2GHZ]; | 686 | &sc->sbands[IEEE80211_BAND_2GHZ]; |
687 | if (test_bit(ATH9K_MODE_11A, sc->sc_ah->caps.wireless_modes)) | 687 | if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_5GHZ) |
688 | hw->wiphy->bands[IEEE80211_BAND_5GHZ] = | 688 | hw->wiphy->bands[IEEE80211_BAND_5GHZ] = |
689 | &sc->sbands[IEEE80211_BAND_5GHZ]; | 689 | &sc->sbands[IEEE80211_BAND_5GHZ]; |
690 | 690 | ||
691 | if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_HT) { | 691 | if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_HT) { |
692 | if (test_bit(ATH9K_MODE_11G, sc->sc_ah->caps.wireless_modes)) | 692 | if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_2GHZ) |
693 | setup_ht_cap(sc, &sc->sbands[IEEE80211_BAND_2GHZ].ht_cap); | 693 | setup_ht_cap(sc, &sc->sbands[IEEE80211_BAND_2GHZ].ht_cap); |
694 | if (test_bit(ATH9K_MODE_11A, sc->sc_ah->caps.wireless_modes)) | 694 | if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_5GHZ) |
695 | setup_ht_cap(sc, &sc->sbands[IEEE80211_BAND_5GHZ].ht_cap); | 695 | setup_ht_cap(sc, &sc->sbands[IEEE80211_BAND_5GHZ].ht_cap); |
696 | } | 696 | } |
697 | 697 | ||