diff options
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/main.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/main.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index 77fbc46624b7..1839b559bdc3 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c | |||
@@ -1430,8 +1430,6 @@ static int ath_init(u16 devid, struct ath_softc *sc) | |||
1430 | for (i = 0; i < sc->keymax; i++) | 1430 | for (i = 0; i < sc->keymax; i++) |
1431 | ath9k_hw_keyreset(ah, (u16) i); | 1431 | ath9k_hw_keyreset(ah, (u16) i); |
1432 | 1432 | ||
1433 | error = ath_regd_init(&sc->sc_ah->regulatory, sc->hw->wiphy, | ||
1434 | ath9k_reg_notifier); | ||
1435 | if (error) | 1433 | if (error) |
1436 | goto bad; | 1434 | goto bad; |
1437 | 1435 | ||
@@ -1644,14 +1642,19 @@ int ath_attach(u16 devid, struct ath_softc *sc) | |||
1644 | if (error != 0) | 1642 | if (error != 0) |
1645 | return error; | 1643 | return error; |
1646 | 1644 | ||
1647 | reg = &sc->sc_ah->regulatory; | ||
1648 | |||
1649 | /* get mac address from hardware and set in mac80211 */ | 1645 | /* get mac address from hardware and set in mac80211 */ |
1650 | 1646 | ||
1651 | SET_IEEE80211_PERM_ADDR(hw, sc->sc_ah->macaddr); | 1647 | SET_IEEE80211_PERM_ADDR(hw, sc->sc_ah->macaddr); |
1652 | 1648 | ||
1653 | ath_set_hw_capab(sc, hw); | 1649 | ath_set_hw_capab(sc, hw); |
1654 | 1650 | ||
1651 | error = ath_regd_init(&sc->sc_ah->regulatory, sc->hw->wiphy, | ||
1652 | ath9k_reg_notifier); | ||
1653 | if (error) | ||
1654 | return error; | ||
1655 | |||
1656 | reg = &sc->sc_ah->regulatory; | ||
1657 | |||
1655 | if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_HT) { | 1658 | if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_HT) { |
1656 | setup_ht_cap(sc, &sc->sbands[IEEE80211_BAND_2GHZ].ht_cap); | 1659 | setup_ht_cap(sc, &sc->sbands[IEEE80211_BAND_2GHZ].ht_cap); |
1657 | if (test_bit(ATH9K_MODE_11A, sc->sc_ah->caps.wireless_modes)) | 1660 | if (test_bit(ATH9K_MODE_11A, sc->sc_ah->caps.wireless_modes)) |