5838c83c1f
SVN-Revision: 18537
52 lines
2.1 KiB
Diff
52 lines
2.1 KiB
Diff
--- a/drivers/net/wireless/ath/ath9k/main.c
|
|
+++ b/drivers/net/wireless/ath/ath9k/main.c
|
|
@@ -1805,13 +1805,15 @@ static int ath_init_softc(u16 devid, str
|
|
|
|
/* setup channels and rates */
|
|
|
|
- sc->sbands[IEEE80211_BAND_2GHZ].channels = ath9k_2ghz_chantable;
|
|
- sc->sbands[IEEE80211_BAND_2GHZ].band = IEEE80211_BAND_2GHZ;
|
|
- sc->sbands[IEEE80211_BAND_2GHZ].n_channels =
|
|
- ARRAY_SIZE(ath9k_2ghz_chantable);
|
|
- sc->sbands[IEEE80211_BAND_2GHZ].bitrates = ath9k_legacy_rates;
|
|
- sc->sbands[IEEE80211_BAND_2GHZ].n_bitrates =
|
|
- ARRAY_SIZE(ath9k_legacy_rates);
|
|
+ if (test_bit(ATH9K_MODE_11G, sc->sc_ah->caps.wireless_modes)) {
|
|
+ sc->sbands[IEEE80211_BAND_2GHZ].channels = ath9k_2ghz_chantable;
|
|
+ sc->sbands[IEEE80211_BAND_2GHZ].band = IEEE80211_BAND_2GHZ;
|
|
+ sc->sbands[IEEE80211_BAND_2GHZ].n_channels =
|
|
+ ARRAY_SIZE(ath9k_2ghz_chantable);
|
|
+ sc->sbands[IEEE80211_BAND_2GHZ].bitrates = ath9k_legacy_rates;
|
|
+ sc->sbands[IEEE80211_BAND_2GHZ].n_bitrates =
|
|
+ ARRAY_SIZE(ath9k_legacy_rates);
|
|
+ }
|
|
|
|
if (test_bit(ATH9K_MODE_11A, sc->sc_ah->caps.wireless_modes)) {
|
|
sc->sbands[IEEE80211_BAND_5GHZ].channels = ath9k_5ghz_chantable;
|
|
@@ -1886,8 +1888,9 @@ void ath_set_hw_capab(struct ath_softc *
|
|
|
|
hw->rate_control_algorithm = "ath9k_rate_control";
|
|
|
|
- hw->wiphy->bands[IEEE80211_BAND_2GHZ] =
|
|
- &sc->sbands[IEEE80211_BAND_2GHZ];
|
|
+ if (test_bit(ATH9K_MODE_11G, sc->sc_ah->caps.wireless_modes))
|
|
+ hw->wiphy->bands[IEEE80211_BAND_2GHZ] =
|
|
+ &sc->sbands[IEEE80211_BAND_2GHZ];
|
|
if (test_bit(ATH9K_MODE_11A, sc->sc_ah->caps.wireless_modes))
|
|
hw->wiphy->bands[IEEE80211_BAND_5GHZ] =
|
|
&sc->sbands[IEEE80211_BAND_5GHZ];
|
|
@@ -1926,9 +1929,12 @@ int ath_init_device(u16 devid, struct at
|
|
reg = &common->regulatory;
|
|
|
|
if (ah->caps.hw_caps & ATH9K_HW_CAP_HT) {
|
|
- setup_ht_cap(sc, &sc->sbands[IEEE80211_BAND_2GHZ].ht_cap);
|
|
+ if (test_bit(ATH9K_MODE_11G, ah->caps.wireless_modes))
|
|
+ setup_ht_cap(sc,
|
|
+ &sc->sbands[IEEE80211_BAND_2GHZ].ht_cap);
|
|
if (test_bit(ATH9K_MODE_11A, ah->caps.wireless_modes))
|
|
- setup_ht_cap(sc, &sc->sbands[IEEE80211_BAND_5GHZ].ht_cap);
|
|
+ setup_ht_cap(sc,
|
|
+ &sc->sbands[IEEE80211_BAND_5GHZ].ht_cap);
|
|
}
|
|
|
|
/* initialize tx/rx engine */
|