aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLuis R. Rodriguez <lrodriguez@atheros.com>2009-08-03 15:24:40 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-08-04 16:44:28 -0400
commit07c10c6177bdd199fead127c2a4c43acb415a5be (patch)
tree84e1608ab2c4c5c623389ed9373cfc89e6754039 /drivers
parentee2bb460e28b757f097efb9e5947a6e47e2477e1 (diff)
ath9k: pass only one argument to hw attach
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/ath/ath9k/hw.c12
-rw-r--r--drivers/net/wireless/ath/ath9k/hw.h2
-rw-r--r--drivers/net/wireless/ath/ath9k/main.c2
3 files changed, 8 insertions, 8 deletions
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index d8ae289a09b4..301ef04e0529 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -627,7 +627,7 @@ static bool ath9k_hw_devid_supported(u16 devid)
627 return false; 627 return false;
628} 628}
629 629
630int ath9k_hw_attach(struct ath_hw *ah, struct ath_softc *sc) 630int ath9k_hw_attach(struct ath_hw *ah)
631{ 631{
632 int r; 632 int r;
633 u32 i, j; 633 u32 i, j;
@@ -641,13 +641,13 @@ int ath9k_hw_attach(struct ath_hw *ah, struct ath_softc *sc)
641 ath9k_hw_set_defaults(ah); 641 ath9k_hw_set_defaults(ah);
642 642
643 if (!ath9k_hw_set_reset_reg(ah, ATH9K_RESET_POWER_ON)) { 643 if (!ath9k_hw_set_reset_reg(ah, ATH9K_RESET_POWER_ON)) {
644 DPRINTF(sc, ATH_DBG_FATAL, "Couldn't reset chip\n"); 644 DPRINTF(ah->ah_sc, ATH_DBG_FATAL, "Couldn't reset chip\n");
645 r = -EIO; 645 r = -EIO;
646 goto bad; 646 goto bad;
647 } 647 }
648 648
649 if (!ath9k_hw_setpower(ah, ATH9K_PM_AWAKE)) { 649 if (!ath9k_hw_setpower(ah, ATH9K_PM_AWAKE)) {
650 DPRINTF(sc, ATH_DBG_FATAL, "Couldn't wakeup chip\n"); 650 DPRINTF(ah->ah_sc, ATH_DBG_FATAL, "Couldn't wakeup chip\n");
651 r = -EIO; 651 r = -EIO;
652 goto bad; 652 goto bad;
653 } 653 }
@@ -663,7 +663,7 @@ int ath9k_hw_attach(struct ath_hw *ah, struct ath_softc *sc)
663 } 663 }
664 } 664 }
665 665
666 DPRINTF(sc, ATH_DBG_RESET, "serialize_regmode is %d\n", 666 DPRINTF(ah->ah_sc, ATH_DBG_RESET, "serialize_regmode is %d\n",
667 ah->config.serialize_regmode); 667 ah->config.serialize_regmode);
668 668
669 switch (ah->hw_version.macVersion) { 669 switch (ah->hw_version.macVersion) {
@@ -676,7 +676,7 @@ int ath9k_hw_attach(struct ath_hw *ah, struct ath_softc *sc)
676 case AR_SREV_VERSION_9287: 676 case AR_SREV_VERSION_9287:
677 break; 677 break;
678 default: 678 default:
679 DPRINTF(sc, ATH_DBG_FATAL, 679 DPRINTF(ah->ah_sc, ATH_DBG_FATAL,
680 "Mac Chip Rev 0x%02x.%x is not supported by " 680 "Mac Chip Rev 0x%02x.%x is not supported by "
681 "this driver\n", ah->hw_version.macVersion, 681 "this driver\n", ah->hw_version.macVersion,
682 ah->hw_version.macRev); 682 ah->hw_version.macRev);
@@ -945,7 +945,7 @@ int ath9k_hw_attach(struct ath_hw *ah, struct ath_softc *sc)
945 945
946 r = ath9k_hw_init_macaddr(ah); 946 r = ath9k_hw_init_macaddr(ah);
947 if (r) { 947 if (r) {
948 DPRINTF(sc, ATH_DBG_FATAL, 948 DPRINTF(ah->ah_sc, ATH_DBG_FATAL,
949 "Failed to initialize MAC address\n"); 949 "Failed to initialize MAC address\n");
950 goto bad; 950 goto bad;
951 } 951 }
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h
index c769dd6a8356..35cf9f840eb3 100644
--- a/drivers/net/wireless/ath/ath9k/hw.h
+++ b/drivers/net/wireless/ath/ath9k/hw.h
@@ -544,7 +544,7 @@ struct ath_hw {
544/* Attach, Detach, Reset */ 544/* Attach, Detach, Reset */
545const char *ath9k_hw_probe(u16 vendorid, u16 devid); 545const char *ath9k_hw_probe(u16 vendorid, u16 devid);
546void ath9k_hw_detach(struct ath_hw *ah); 546void ath9k_hw_detach(struct ath_hw *ah);
547int ath9k_hw_attach(struct ath_hw *ah, struct ath_softc *sc); 547int ath9k_hw_attach(struct ath_hw *ah);
548void ath9k_hw_rfdetach(struct ath_hw *ah); 548void ath9k_hw_rfdetach(struct ath_hw *ah);
549int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan, 549int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
550 bool bChannelChange); 550 bool bChannelChange);
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 605d3280733a..62429508578a 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -1334,7 +1334,7 @@ static int ath_init(u16 devid, struct ath_softc *sc)
1334 ah->hw_version.devid = devid; 1334 ah->hw_version.devid = devid;
1335 sc->sc_ah = ah; 1335 sc->sc_ah = ah;
1336 1336
1337 r = ath9k_hw_attach(ah, sc); 1337 r = ath9k_hw_attach(ah);
1338 if (r) { 1338 if (r) {
1339 DPRINTF(sc, ATH_DBG_FATAL, 1339 DPRINTF(sc, ATH_DBG_FATAL,
1340 "Unable to attach hardware; " 1340 "Unable to attach hardware; "