aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath5k/base.c
diff options
context:
space:
mode:
authorLuis R. Rodriguez <lrodriguez@atheros.com>2009-08-17 21:07:23 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-08-20 11:36:03 -0400
commit608b88cb34b0e70a538ee1fc334cc833ef691836 (patch)
tree6d2a363cea722241581306964da6cff8724b407a /drivers/net/wireless/ath/ath5k/base.c
parent4c48381786159ba3f3d8a33d967aeb049341a220 (diff)
ath: move regulatory info into shared common structure
This moves the shared regulatory structure into the common structure. We will use this ongoing for common data. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath5k/base.c')
-rw-r--r--drivers/net/wireless/ath/ath5k/base.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
index 3951b5b13424..5056410d788a 100644
--- a/drivers/net/wireless/ath/ath5k/base.c
+++ b/drivers/net/wireless/ath/ath5k/base.c
@@ -718,9 +718,9 @@ static int ath5k_reg_notifier(struct wiphy *wiphy, struct regulatory_request *re
718{ 718{
719 struct ieee80211_hw *hw = wiphy_to_ieee80211_hw(wiphy); 719 struct ieee80211_hw *hw = wiphy_to_ieee80211_hw(wiphy);
720 struct ath5k_softc *sc = hw->priv; 720 struct ath5k_softc *sc = hw->priv;
721 struct ath_regulatory *reg = &sc->ah->ah_regulatory; 721 struct ath_regulatory *regulatory = &sc->common.regulatory;
722 722
723 return ath_reg_notifier_apply(wiphy, request, reg); 723 return ath_reg_notifier_apply(wiphy, request, regulatory);
724} 724}
725 725
726static int 726static int
@@ -728,6 +728,7 @@ ath5k_attach(struct pci_dev *pdev, struct ieee80211_hw *hw)
728{ 728{
729 struct ath5k_softc *sc = hw->priv; 729 struct ath5k_softc *sc = hw->priv;
730 struct ath5k_hw *ah = sc->ah; 730 struct ath5k_hw *ah = sc->ah;
731 struct ath_regulatory *regulatory = &sc->common.regulatory;
731 u8 mac[ETH_ALEN] = {}; 732 u8 mac[ETH_ALEN] = {};
732 int ret; 733 int ret;
733 734
@@ -817,9 +818,8 @@ ath5k_attach(struct pci_dev *pdev, struct ieee80211_hw *hw)
817 memset(sc->bssidmask, 0xff, ETH_ALEN); 818 memset(sc->bssidmask, 0xff, ETH_ALEN);
818 ath5k_hw_set_bssid_mask(sc->ah, sc->bssidmask); 819 ath5k_hw_set_bssid_mask(sc->ah, sc->bssidmask);
819 820
820 ah->ah_regulatory.current_rd = 821 regulatory->current_rd = ah->ah_capabilities.cap_eeprom.ee_regdomain;
821 ah->ah_capabilities.cap_eeprom.ee_regdomain; 822 ret = ath_regd_init(regulatory, hw->wiphy, ath5k_reg_notifier);
822 ret = ath_regd_init(&ah->ah_regulatory, hw->wiphy, ath5k_reg_notifier);
823 if (ret) { 823 if (ret) {
824 ATH5K_ERR(sc, "can't initialize regulatory system\n"); 824 ATH5K_ERR(sc, "can't initialize regulatory system\n");
825 goto err_queues; 825 goto err_queues;
@@ -831,8 +831,8 @@ ath5k_attach(struct pci_dev *pdev, struct ieee80211_hw *hw)
831 goto err_queues; 831 goto err_queues;
832 } 832 }
833 833
834 if (!ath_is_world_regd(&sc->ah->ah_regulatory)) 834 if (!ath_is_world_regd(regulatory))
835 regulatory_hint(hw->wiphy, sc->ah->ah_regulatory.alpha2); 835 regulatory_hint(hw->wiphy, regulatory->alpha2);
836 836
837 ath5k_init_leds(sc); 837 ath5k_init_leds(sc);
838 838