]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/net/wireless/ath/ath9k/init.c
ath9k: Use atomic reference count for interrupt ops
[karo-tx-linux.git] / drivers / net / wireless / ath / ath9k / init.c
index ac5107172f941aff92e5e73b175cf12f25d7d055..db38a58e752d4a001ffd9b22a909b6f3c55669cd 100644 (file)
@@ -548,7 +548,7 @@ static void ath9k_init_misc(struct ath_softc *sc)
                sc->ant_comb.count = ATH_ANT_DIV_COMB_INIT_COUNT;
 }
 
-static int ath9k_init_softc(u16 devid, struct ath_softc *sc, u16 subsysid,
+static int ath9k_init_softc(u16 devid, struct ath_softc *sc,
                            const struct ath_bus_ops *bus_ops)
 {
        struct ath9k_platform_data *pdata = sc->dev->platform_data;
@@ -563,10 +563,10 @@ static int ath9k_init_softc(u16 devid, struct ath_softc *sc, u16 subsysid,
 
        ah->hw = sc->hw;
        ah->hw_version.devid = devid;
-       ah->hw_version.subsysid = subsysid;
        ah->reg_ops.read = ath9k_ioread32;
        ah->reg_ops.write = ath9k_iowrite32;
        ah->reg_ops.rmw = ath9k_reg_rmw;
+       atomic_set(&ah->intr_ref_cnt, -1);
        sc->sc_ah = ah;
 
        if (!pdata) {
@@ -670,8 +670,10 @@ static void ath9k_init_band_txpower(struct ath_softc *sc, int band)
 static void ath9k_init_txpower_limits(struct ath_softc *sc)
 {
        struct ath_hw *ah = sc->sc_ah;
+       struct ath_common *common = ath9k_hw_common(sc->sc_ah);
        struct ath9k_channel *curchan = ah->curchan;
 
+       ah->txchainmask = common->tx_chainmask;
        if (ah->caps.hw_caps & ATH9K_HW_CAP_2GHZ)
                ath9k_init_band_txpower(sc, IEEE80211_BAND_2GHZ);
        if (ah->caps.hw_caps & ATH9K_HW_CAP_5GHZ)
@@ -741,7 +743,7 @@ void ath9k_set_hw_capab(struct ath_softc *sc, struct ieee80211_hw *hw)
        SET_IEEE80211_PERM_ADDR(hw, common->macaddr);
 }
 
-int ath9k_init_device(u16 devid, struct ath_softc *sc, u16 subsysid,
+int ath9k_init_device(u16 devid, struct ath_softc *sc,
                    const struct ath_bus_ops *bus_ops)
 {
        struct ieee80211_hw *hw = sc->hw;
@@ -751,7 +753,7 @@ int ath9k_init_device(u16 devid, struct ath_softc *sc, u16 subsysid,
        struct ath_regulatory *reg;
 
        /* Bring up device */
-       error = ath9k_init_softc(devid, sc, subsysid, bus_ops);
+       error = ath9k_init_softc(devid, sc, bus_ops);
        if (error != 0)
                goto error_init;