diff options
author | Vasanthakumar Thiagarajan <vasanth@atheros.com> | 2009-09-09 05:55:49 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-09-09 11:25:25 -0400 |
commit | aeac355d23fb13a2082a8740ae7cf9408a71ec2c (patch) | |
tree | 831acd0d8035e29f4d72b31121a929fb28442cb4 /drivers | |
parent | 4d8cd26849737e141ff0aa23fedacef4ea76ea4f (diff) |
ath9k: Store subsystem id in struct hw_version
This subsystem id will be used later to turn on the btcoex
support.
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-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/hw.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/main.c | 7 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/pci.c | 4 |
5 files changed, 10 insertions, 6 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ahb.c b/drivers/net/wireless/ath/ath9k/ahb.c index 7dc6301ae201..2ad7d0280f7a 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_init_device(AR5416_AR9100_DEVID, sc); | 122 | ret = ath_init_device(AR5416_AR9100_DEVID, sc, 0x0); |
123 | if (ret) { | 123 | if (ret) { |
124 | dev_err(&pdev->dev, "failed to initialize device\n"); | 124 | dev_err(&pdev->dev, "failed to initialize device\n"); |
125 | goto err_free_hw; | 125 | goto err_free_hw; |
diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h index 1c68a9da22d4..1d59f10f68da 100644 --- a/drivers/net/wireless/ath/ath9k/ath9k.h +++ b/drivers/net/wireless/ath/ath9k/ath9k.h | |||
@@ -658,7 +658,7 @@ extern struct ieee80211_ops ath9k_ops; | |||
658 | 658 | ||
659 | irqreturn_t ath_isr(int irq, void *dev); | 659 | irqreturn_t ath_isr(int irq, void *dev); |
660 | void ath_cleanup(struct ath_softc *sc); | 660 | void ath_cleanup(struct ath_softc *sc); |
661 | int ath_init_device(u16 devid, struct ath_softc *sc); | 661 | int ath_init_device(u16 devid, struct ath_softc *sc, u16 subsysid); |
662 | void ath_detach(struct ath_softc *sc); | 662 | void ath_detach(struct ath_softc *sc); |
663 | const char *ath_mac_bb_name(u32 mac_bb_version); | 663 | const char *ath_mac_bb_name(u32 mac_bb_version); |
664 | const char *ath_rf_name(u16 rf_version); | 664 | const char *ath_rf_name(u16 rf_version); |
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h index a592f1a46ecd..64ea547adef0 100644 --- a/drivers/net/wireless/ath/ath9k/hw.h +++ b/drivers/net/wireless/ath/ath9k/hw.h | |||
@@ -390,6 +390,7 @@ struct ath9k_hw_version { | |||
390 | u16 phyRev; | 390 | u16 phyRev; |
391 | u16 analog5GhzRev; | 391 | u16 analog5GhzRev; |
392 | u16 analog2GhzRev; | 392 | u16 analog2GhzRev; |
393 | u16 subsysid; | ||
393 | }; | 394 | }; |
394 | 395 | ||
395 | /* Generic TSF timer definitions */ | 396 | /* Generic TSF timer definitions */ |
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index ce011ab5e89d..3dc7b5a13e64 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c | |||
@@ -1310,7 +1310,7 @@ static int ath9k_reg_notifier(struct wiphy *wiphy, | |||
1310 | * to allow the separation between hardware specific | 1310 | * to allow the separation between hardware specific |
1311 | * variables (now in ath_hw) and driver specific variables. | 1311 | * variables (now in ath_hw) and driver specific variables. |
1312 | */ | 1312 | */ |
1313 | static int ath_init_softc(u16 devid, struct ath_softc *sc) | 1313 | static int ath_init_softc(u16 devid, struct ath_softc *sc, u16 subsysid) |
1314 | { | 1314 | { |
1315 | struct ath_hw *ah = NULL; | 1315 | struct ath_hw *ah = NULL; |
1316 | int r = 0, i; | 1316 | int r = 0, i; |
@@ -1348,6 +1348,7 @@ static int ath_init_softc(u16 devid, struct ath_softc *sc) | |||
1348 | 1348 | ||
1349 | ah->ah_sc = sc; | 1349 | ah->ah_sc = sc; |
1350 | ah->hw_version.devid = devid; | 1350 | ah->hw_version.devid = devid; |
1351 | ah->hw_version.subsysid = subsysid; | ||
1351 | sc->sc_ah = ah; | 1352 | sc->sc_ah = ah; |
1352 | 1353 | ||
1353 | r = ath9k_hw_init(ah); | 1354 | r = ath9k_hw_init(ah); |
@@ -1577,7 +1578,7 @@ void ath_set_hw_capab(struct ath_softc *sc, struct ieee80211_hw *hw) | |||
1577 | } | 1578 | } |
1578 | 1579 | ||
1579 | /* Device driver core initialization */ | 1580 | /* Device driver core initialization */ |
1580 | int ath_init_device(u16 devid, struct ath_softc *sc) | 1581 | int ath_init_device(u16 devid, struct ath_softc *sc, u16 subsysid) |
1581 | { | 1582 | { |
1582 | struct ieee80211_hw *hw = sc->hw; | 1583 | struct ieee80211_hw *hw = sc->hw; |
1583 | int error = 0, i; | 1584 | int error = 0, i; |
@@ -1585,7 +1586,7 @@ int ath_init_device(u16 devid, struct ath_softc *sc) | |||
1585 | 1586 | ||
1586 | DPRINTF(sc, ATH_DBG_CONFIG, "Attach ATH hw\n"); | 1587 | DPRINTF(sc, ATH_DBG_CONFIG, "Attach ATH hw\n"); |
1587 | 1588 | ||
1588 | error = ath_init_softc(devid, sc); | 1589 | error = ath_init_softc(devid, sc, subsysid); |
1589 | if (error != 0) | 1590 | if (error != 0) |
1590 | return error; | 1591 | return error; |
1591 | 1592 | ||
diff --git a/drivers/net/wireless/ath/ath9k/pci.c b/drivers/net/wireless/ath/ath9k/pci.c index 8b288141d4c1..903dd8ad9d43 100644 --- a/drivers/net/wireless/ath/ath9k/pci.c +++ b/drivers/net/wireless/ath/ath9k/pci.c | |||
@@ -88,6 +88,7 @@ static int ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) | |||
88 | struct ath_softc *sc; | 88 | struct ath_softc *sc; |
89 | struct ieee80211_hw *hw; | 89 | struct ieee80211_hw *hw; |
90 | u8 csz; | 90 | u8 csz; |
91 | u16 subsysid; | ||
91 | u32 val; | 92 | u32 val; |
92 | int ret = 0; | 93 | int ret = 0; |
93 | struct ath_hw *ah; | 94 | struct ath_hw *ah; |
@@ -178,7 +179,8 @@ static int ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) | |||
178 | sc->mem = mem; | 179 | sc->mem = mem; |
179 | sc->bus_ops = &ath_pci_bus_ops; | 180 | sc->bus_ops = &ath_pci_bus_ops; |
180 | 181 | ||
181 | ret = ath_init_device(id->device, sc); | 182 | pci_read_config_word(pdev, PCI_SUBSYSTEM_ID, &subsysid); |
183 | ret = ath_init_device(id->device, sc, subsysid); | ||
182 | if (ret) { | 184 | if (ret) { |
183 | dev_err(&pdev->dev, "failed to initialize device\n"); | 185 | dev_err(&pdev->dev, "failed to initialize device\n"); |
184 | goto bad3; | 186 | goto bad3; |