ath9k: pass only one argument to hw attach
authorLuis R. Rodriguez <lrodriguez@atheros.com>
Mon, 3 Aug 2009 19:24:40 +0000 (12:24 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 4 Aug 2009 20:44:28 +0000 (16:44 -0400)
The softc is cached and set within the ath_hw struct.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/hw.c
drivers/net/wireless/ath/ath9k/hw.h
drivers/net/wireless/ath/ath9k/main.c

index d8ae289a09b4e691da301d1e520aeee19532ca89..301ef04e05295fa9d8b48487a92792d97a3215d3 100644 (file)
@@ -627,7 +627,7 @@ static bool ath9k_hw_devid_supported(u16 devid)
        return false;
 }
 
-int ath9k_hw_attach(struct ath_hw *ah, struct ath_softc *sc)
+int ath9k_hw_attach(struct ath_hw *ah)
 {
        int r;
        u32 i, j;
@@ -641,13 +641,13 @@ int ath9k_hw_attach(struct ath_hw *ah, struct ath_softc *sc)
        ath9k_hw_set_defaults(ah);
 
        if (!ath9k_hw_set_reset_reg(ah, ATH9K_RESET_POWER_ON)) {
-               DPRINTF(sc, ATH_DBG_FATAL, "Couldn't reset chip\n");
+               DPRINTF(ah->ah_sc, ATH_DBG_FATAL, "Couldn't reset chip\n");
                r = -EIO;
                goto bad;
        }
 
        if (!ath9k_hw_setpower(ah, ATH9K_PM_AWAKE)) {
-               DPRINTF(sc, ATH_DBG_FATAL, "Couldn't wakeup chip\n");
+               DPRINTF(ah->ah_sc, ATH_DBG_FATAL, "Couldn't wakeup chip\n");
                r = -EIO;
                goto bad;
        }
@@ -663,7 +663,7 @@ int ath9k_hw_attach(struct ath_hw *ah, struct ath_softc *sc)
                }
        }
 
-       DPRINTF(sc, ATH_DBG_RESET, "serialize_regmode is %d\n",
+       DPRINTF(ah->ah_sc, ATH_DBG_RESET, "serialize_regmode is %d\n",
                ah->config.serialize_regmode);
 
        switch (ah->hw_version.macVersion) {
@@ -676,7 +676,7 @@ int ath9k_hw_attach(struct ath_hw *ah, struct ath_softc *sc)
        case AR_SREV_VERSION_9287:
                break;
        default:
-               DPRINTF(sc, ATH_DBG_FATAL,
+               DPRINTF(ah->ah_sc, ATH_DBG_FATAL,
                        "Mac Chip Rev 0x%02x.%x is not supported by "
                        "this driver\n", ah->hw_version.macVersion,
                        ah->hw_version.macRev);
@@ -945,7 +945,7 @@ int ath9k_hw_attach(struct ath_hw *ah, struct ath_softc *sc)
 
        r = ath9k_hw_init_macaddr(ah);
        if (r) {
-               DPRINTF(sc, ATH_DBG_FATAL,
+               DPRINTF(ah->ah_sc, ATH_DBG_FATAL,
                        "Failed to initialize MAC address\n");
                goto bad;
        }
index c769dd6a83567d2637a07d0b28b947622435391d..35cf9f840eb3d5c68b027bac1dc9432153899816 100644 (file)
@@ -544,7 +544,7 @@ struct ath_hw {
 /* Attach, Detach, Reset */
 const char *ath9k_hw_probe(u16 vendorid, u16 devid);
 void ath9k_hw_detach(struct ath_hw *ah);
-int ath9k_hw_attach(struct ath_hw *ah, struct ath_softc *sc);
+int ath9k_hw_attach(struct ath_hw *ah);
 void ath9k_hw_rfdetach(struct ath_hw *ah);
 int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
                   bool bChannelChange);
index 605d3280733a16c3c5223e1f9225cb556f0a3d79..62429508578a90aef8c9cc024740a8e7327fe5ec 100644 (file)
@@ -1334,7 +1334,7 @@ static int ath_init(u16 devid, struct ath_softc *sc)
        ah->hw_version.devid = devid;
        sc->sc_ah = ah;
 
-       r = ath9k_hw_attach(ah, sc);
+       r = ath9k_hw_attach(ah);
        if (r) {
                DPRINTF(sc, ATH_DBG_FATAL,
                        "Unable to attach hardware; "