diff options
author | Luis R. Rodriguez <lrodriguez@atheros.com> | 2009-08-03 15:24:47 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-08-04 16:44:30 -0400 |
commit | 1e40bcfa91429edb665af9ffefb2658350913d35 (patch) | |
tree | 060b92a64521e5d90c15044dafb5a342d3e1760d | |
parent | f637cfd6bbacbaeab329f9dfc56e9855cc15849d (diff) |
ath9k: distinguish between device initialization and ath_softc init
We re-label the device driver initialization routines from the
ath_softc, the "Software Carrier" fillers. This should make it
clearer what each of these do.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ahb.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ath9k.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/main.c | 13 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/pci.c | 2 |
4 files changed, 13 insertions, 6 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ahb.c b/drivers/net/wireless/ath/ath9k/ahb.c index 0e65c51ba176..5618fc25d52f 100644 --- a/drivers/net/wireless/ath/ath9k/ahb.c +++ b/drivers/net/wireless/ath/ath9k/ahb.c | |||
@@ -119,7 +119,7 @@ static int ath_ahb_probe(struct platform_device *pdev) | |||
119 | sc->bus_ops = &ath_ahb_bus_ops; | 119 | sc->bus_ops = &ath_ahb_bus_ops; |
120 | sc->irq = irq; | 120 | sc->irq = irq; |
121 | 121 | ||
122 | ret = ath_attach(AR5416_AR9100_DEVID, sc); | 122 | ret = ath_init_device(AR5416_AR9100_DEVID, sc); |
123 | if (ret != 0) { | 123 | if (ret != 0) { |
124 | dev_err(&pdev->dev, "failed to attach device, err=%d\n", ret); | 124 | dev_err(&pdev->dev, "failed to attach device, err=%d\n", ret); |
125 | ret = -ENODEV; | 125 | ret = -ENODEV; |
diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h index bda0f302340c..7a5a157e15c4 100644 --- a/drivers/net/wireless/ath/ath9k/ath9k.h +++ b/drivers/net/wireless/ath/ath9k/ath9k.h | |||
@@ -642,7 +642,7 @@ extern struct ieee80211_ops ath9k_ops; | |||
642 | 642 | ||
643 | irqreturn_t ath_isr(int irq, void *dev); | 643 | irqreturn_t ath_isr(int irq, void *dev); |
644 | void ath_cleanup(struct ath_softc *sc); | 644 | void ath_cleanup(struct ath_softc *sc); |
645 | int ath_attach(u16 devid, struct ath_softc *sc); | 645 | int ath_init_device(u16 devid, struct ath_softc *sc); |
646 | void ath_detach(struct ath_softc *sc); | 646 | void ath_detach(struct ath_softc *sc); |
647 | const char *ath_mac_bb_name(u32 mac_bb_version); | 647 | const char *ath_mac_bb_name(u32 mac_bb_version); |
648 | const char *ath_rf_name(u16 rf_version); | 648 | const char *ath_rf_name(u16 rf_version); |
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index 751d803e1bc4..91bffc91bbb0 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c | |||
@@ -1292,7 +1292,13 @@ static int ath9k_reg_notifier(struct wiphy *wiphy, | |||
1292 | return ath_reg_notifier_apply(wiphy, request, reg); | 1292 | return ath_reg_notifier_apply(wiphy, request, reg); |
1293 | } | 1293 | } |
1294 | 1294 | ||
1295 | static int ath_init(u16 devid, struct ath_softc *sc) | 1295 | /* |
1296 | * Initialize and fill ath_softc, ath_sofct is the | ||
1297 | * "Software Carrier" struct. Historically it has existed | ||
1298 | * to allow the separation between hardware specific | ||
1299 | * variables (now in ath_hw) and driver specific variables. | ||
1300 | */ | ||
1301 | static int ath_init_softc(u16 devid, struct ath_softc *sc) | ||
1296 | { | 1302 | { |
1297 | struct ath_hw *ah = NULL; | 1303 | struct ath_hw *ah = NULL; |
1298 | int r = 0, i; | 1304 | int r = 0, i; |
@@ -1558,7 +1564,8 @@ void ath_set_hw_capab(struct ath_softc *sc, struct ieee80211_hw *hw) | |||
1558 | &sc->sbands[IEEE80211_BAND_5GHZ]; | 1564 | &sc->sbands[IEEE80211_BAND_5GHZ]; |
1559 | } | 1565 | } |
1560 | 1566 | ||
1561 | int ath_attach(u16 devid, struct ath_softc *sc) | 1567 | /* Device driver core initialization */ |
1568 | int ath_init_device(u16 devid, struct ath_softc *sc) | ||
1562 | { | 1569 | { |
1563 | struct ieee80211_hw *hw = sc->hw; | 1570 | struct ieee80211_hw *hw = sc->hw; |
1564 | int error = 0, i; | 1571 | int error = 0, i; |
@@ -1566,7 +1573,7 @@ int ath_attach(u16 devid, struct ath_softc *sc) | |||
1566 | 1573 | ||
1567 | DPRINTF(sc, ATH_DBG_CONFIG, "Attach ATH hw\n"); | 1574 | DPRINTF(sc, ATH_DBG_CONFIG, "Attach ATH hw\n"); |
1568 | 1575 | ||
1569 | error = ath_init(devid, sc); | 1576 | error = ath_init_softc(devid, sc); |
1570 | if (error != 0) | 1577 | if (error != 0) |
1571 | return error; | 1578 | return error; |
1572 | 1579 | ||
diff --git a/drivers/net/wireless/ath/ath9k/pci.c b/drivers/net/wireless/ath/ath9k/pci.c index cd4841be80af..3546504a83c4 100644 --- a/drivers/net/wireless/ath/ath9k/pci.c +++ b/drivers/net/wireless/ath/ath9k/pci.c | |||
@@ -178,7 +178,7 @@ static int ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) | |||
178 | sc->mem = mem; | 178 | sc->mem = mem; |
179 | sc->bus_ops = &ath_pci_bus_ops; | 179 | sc->bus_ops = &ath_pci_bus_ops; |
180 | 180 | ||
181 | if (ath_attach(id->device, sc) != 0) { | 181 | if (ath_init_device(id->device, sc) != 0) { |
182 | ret = -ENODEV; | 182 | ret = -ENODEV; |
183 | goto bad3; | 183 | goto bad3; |
184 | } | 184 | } |