diff options
author | Luis R. Rodriguez <lrodriguez@atheros.com> | 2009-09-10 14:08:14 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-10-07 16:39:26 -0400 |
commit | 27c51f1a349f3e4eb9c1d6d3a548eafe1828cc7a (patch) | |
tree | 4bd882ed2bd08fb60e3f1cfd33c3c6304a9c94e6 /drivers/net/wireless/ath/ath9k/main.c | |
parent | 394317fc793eb25dbbda4432d29d97cd80f3b561 (diff) |
ath9k: move ath_common to ath_hw
This ensures that we can access common on hw related code
independent of the driver core.
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/ath9k/main.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/main.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index a96350d2aace..dc8d47e4d0f5 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c | |||
@@ -1348,7 +1348,7 @@ static int ath9k_reg_notifier(struct wiphy *wiphy, | |||
1348 | struct ieee80211_hw *hw = wiphy_to_ieee80211_hw(wiphy); | 1348 | struct ieee80211_hw *hw = wiphy_to_ieee80211_hw(wiphy); |
1349 | struct ath_wiphy *aphy = hw->priv; | 1349 | struct ath_wiphy *aphy = hw->priv; |
1350 | struct ath_softc *sc = aphy->sc; | 1350 | struct ath_softc *sc = aphy->sc; |
1351 | struct ath_regulatory *reg = &sc->common.regulatory; | 1351 | struct ath_regulatory *reg = ath9k_hw_regulatory(sc->sc_ah); |
1352 | 1352 | ||
1353 | return ath_reg_notifier_apply(wiphy, request, reg); | 1353 | return ath_reg_notifier_apply(wiphy, request, reg); |
1354 | } | 1354 | } |
@@ -1516,14 +1516,6 @@ static int ath_init_softc(u16 devid, struct ath_softc *sc, u16 subsysid) | |||
1516 | tasklet_init(&sc->bcon_tasklet, ath_beacon_tasklet, | 1516 | tasklet_init(&sc->bcon_tasklet, ath_beacon_tasklet, |
1517 | (unsigned long)sc); | 1517 | (unsigned long)sc); |
1518 | 1518 | ||
1519 | /* | ||
1520 | * Cache line size is used to size and align various | ||
1521 | * structures used to communicate with the hardware. | ||
1522 | */ | ||
1523 | ath_read_cachesize(sc, &csz); | ||
1524 | /* XXX assert csz is non-zero */ | ||
1525 | sc->common.cachelsz = csz << 2; /* convert to bytes */ | ||
1526 | |||
1527 | ah = kzalloc(sizeof(struct ath_hw), GFP_KERNEL); | 1519 | ah = kzalloc(sizeof(struct ath_hw), GFP_KERNEL); |
1528 | if (!ah) { | 1520 | if (!ah) { |
1529 | r = -ENOMEM; | 1521 | r = -ENOMEM; |
@@ -1535,6 +1527,16 @@ static int ath_init_softc(u16 devid, struct ath_softc *sc, u16 subsysid) | |||
1535 | ah->hw_version.subsysid = subsysid; | 1527 | ah->hw_version.subsysid = subsysid; |
1536 | sc->sc_ah = ah; | 1528 | sc->sc_ah = ah; |
1537 | 1529 | ||
1530 | common = ath9k_hw_common(ah); | ||
1531 | |||
1532 | /* | ||
1533 | * Cache line size is used to size and align various | ||
1534 | * structures used to communicate with the hardware. | ||
1535 | */ | ||
1536 | ath_read_cachesize(sc, &csz); | ||
1537 | /* XXX assert csz is non-zero */ | ||
1538 | common->cachelsz = csz << 2; /* convert to bytes */ | ||
1539 | |||
1538 | if (ath9k_init_debug(ah) < 0) | 1540 | if (ath9k_init_debug(ah) < 0) |
1539 | dev_err(sc->dev, "Unable to create debugfs files\n"); | 1541 | dev_err(sc->dev, "Unable to create debugfs files\n"); |
1540 | 1542 | ||
@@ -1677,8 +1679,6 @@ static int ath_init_softc(u16 devid, struct ath_softc *sc, u16 subsysid) | |||
1677 | ath9k_hw_setcapability(ah, ATH9K_CAP_DIVERSITY, 1, true, NULL); | 1679 | ath9k_hw_setcapability(ah, ATH9K_CAP_DIVERSITY, 1, true, NULL); |
1678 | sc->rx.defant = ath9k_hw_getdefantenna(ah); | 1680 | sc->rx.defant = ath9k_hw_getdefantenna(ah); |
1679 | 1681 | ||
1680 | common = ath9k_hw_common(ah); | ||
1681 | |||
1682 | if (ah->caps.hw_caps & ATH9K_HW_CAP_BSSIDMASK) | 1682 | if (ah->caps.hw_caps & ATH9K_HW_CAP_BSSIDMASK) |
1683 | memcpy(common->bssidmask, ath_bcast_mac, ETH_ALEN); | 1683 | memcpy(common->bssidmask, ath_bcast_mac, ETH_ALEN); |
1684 | 1684 | ||