aboutsummaryrefslogtreecommitdiffstats
path: root/package/mac80211/patches/300-ath9k_fix_init_crash.patch
diff options
context:
space:
mode:
Diffstat (limited to 'package/mac80211/patches/300-ath9k_fix_init_crash.patch')
-rw-r--r--package/mac80211/patches/300-ath9k_fix_init_crash.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/package/mac80211/patches/300-ath9k_fix_init_crash.patch b/package/mac80211/patches/300-ath9k_fix_init_crash.patch
new file mode 100644
index 0000000000..8f3540b5d4
--- /dev/null
+++ b/package/mac80211/patches/300-ath9k_fix_init_crash.patch
@@ -0,0 +1,35 @@
+--- 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
+ sc->mem = mem;
+ sc->irq = irq;
+
++ /* Will be cleared in ath9k_start() */
++ sc->sc_flags |= SC_OP_INVALID;
++
+ ret = request_irq(irq, ath_isr, IRQF_SHARED, "ath9k", sc);
+ if (ret) {
+ dev_err(&pdev->dev, "request_irq failed\n");
+--- 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, s
+ int ret = 0, i;
+ int csz = 0;
+
+- sc->sc_flags |= SC_OP_INVALID;
+-
+ ah = kzalloc(sizeof(struct ath_hw), GFP_KERNEL);
+ if (!ah)
+ return -ENOMEM;
+--- a/drivers/net/wireless/ath/ath9k/pci.c
++++ b/drivers/net/wireless/ath/ath9k/pci.c
+@@ -202,6 +202,9 @@ static int ath_pci_probe(struct pci_dev
+ sc->dev = &pdev->dev;
+ sc->mem = mem;
+
++ /* Will be cleared in ath9k_start() */
++ sc->sc_flags |= SC_OP_INVALID;
++
+ ret = request_irq(pdev->irq, ath_isr, IRQF_SHARED, "ath9k", sc);
+ if (ret) {
+ dev_err(&pdev->dev, "request_irq failed\n");