aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath
diff options
context:
space:
mode:
authorSujith <Sujith.Manoharan@atheros.com>2010-01-13 23:50:57 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-01-14 18:16:55 -0500
commit5e4ea1f0ed256382d6d839fbd7a5c7f1b99b6cb0 (patch)
tree1954c51af0ae909ed2bf586e8e5bc5e69aaddec3 /drivers/net/wireless/ath
parent2f1f00fc9b477481ad5c63976385c345851fee3d (diff)
ath9k: Fix panic on driver load
The device has to be marked as invalid before registering the ISR. HW initialization takes place after the ISR has been registered, and the invalid flag is eventually cleared in the ->stop() callback. Reported-by: Pavel Roskin <proski@gnu.org> Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath')
-rw-r--r--drivers/net/wireless/ath/ath9k/ahb.c3
-rw-r--r--drivers/net/wireless/ath/ath9k/init.c2
-rw-r--r--drivers/net/wireless/ath/ath9k/pci.c3
3 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ahb.c b/drivers/net/wireless/ath/ath9k/ahb.c
index f24b1f4c3e29..9e62a569e816 100644
--- a/drivers/net/wireless/ath/ath9k/ahb.c
+++ b/drivers/net/wireless/ath/ath9k/ahb.c
@@ -121,6 +121,9 @@ static int ath_ahb_probe(struct platform_device *pdev)
121 sc->mem = mem; 121 sc->mem = mem;
122 sc->irq = irq; 122 sc->irq = irq;
123 123
124 /* Will be cleared in ath9k_start() */
125 sc->sc_flags |= SC_OP_INVALID;
126
124 ret = request_irq(irq, ath_isr, IRQF_SHARED, "ath9k", sc); 127 ret = request_irq(irq, ath_isr, IRQF_SHARED, "ath9k", sc);
125 if (ret) { 128 if (ret) {
126 dev_err(&pdev->dev, "request_irq failed\n"); 129 dev_err(&pdev->dev, "request_irq failed\n");
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c
index 16d1efb4b8b2..5f78d7a5ff22 100644
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
@@ -534,8 +534,6 @@ static int ath9k_init_softc(u16 devid, struct ath_softc *sc, u16 subsysid,
534 int ret = 0, i; 534 int ret = 0, i;
535 int csz = 0; 535 int csz = 0;
536 536
537 sc->sc_flags |= SC_OP_INVALID;
538
539 ah = kzalloc(sizeof(struct ath_hw), GFP_KERNEL); 537 ah = kzalloc(sizeof(struct ath_hw), GFP_KERNEL);
540 if (!ah) 538 if (!ah)
541 return -ENOMEM; 539 return -ENOMEM;
diff --git a/drivers/net/wireless/ath/ath9k/pci.c b/drivers/net/wireless/ath/ath9k/pci.c
index 95b9a07597ef..4ae7b5f12029 100644
--- a/drivers/net/wireless/ath/ath9k/pci.c
+++ b/drivers/net/wireless/ath/ath9k/pci.c
@@ -198,6 +198,9 @@ static int ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
198 sc->dev = &pdev->dev; 198 sc->dev = &pdev->dev;
199 sc->mem = mem; 199 sc->mem = mem;
200 200
201 /* Will be cleared in ath9k_start() */
202 sc->sc_flags |= SC_OP_INVALID;
203
201 ret = request_irq(pdev->irq, ath_isr, IRQF_SHARED, "ath9k", sc); 204 ret = request_irq(pdev->irq, ath_isr, IRQF_SHARED, "ath9k", sc);
202 if (ret) { 205 if (ret) {
203 dev_err(&pdev->dev, "request_irq failed\n"); 206 dev_err(&pdev->dev, "request_irq failed\n");