[backfire] backport r28376
[openwrt-10.03/.git] / package / mac80211 / patches / 584-ath9k_fix_reset.patch
1 --- a/drivers/net/wireless/ath/ath9k/main.c
2 +++ b/drivers/net/wireless/ath/ath9k/main.c
3 @@ -667,15 +667,15 @@ void ath9k_tasklet(unsigned long data)
4         u32 status = sc->intrstatus;
5         u32 rxmask;
6  
7 +       ath9k_ps_wakeup(sc);
8 +       spin_lock(&sc->sc_pcu_lock);
9 +
10         if ((status & ATH9K_INT_FATAL) ||
11             (status & ATH9K_INT_BB_WATCHDOG)) {
12                 ieee80211_queue_work(sc->hw, &sc->hw_reset_work);
13 -               return;
14 +               goto out;
15         }
16  
17 -       ath9k_ps_wakeup(sc);
18 -       spin_lock(&sc->sc_pcu_lock);
19 -
20         /*
21          * Only run the baseband hang check if beacons stop working in AP or
22          * IBSS mode, because it has a high false positive rate. For station
23 @@ -723,6 +723,7 @@ void ath9k_tasklet(unsigned long data)
24                 if (status & ATH9K_INT_GENTIMER)
25                         ath_gen_timer_isr(sc->sc_ah);
26  
27 +out:
28         /* re-enable hardware interrupt */
29         ath9k_hw_enable_interrupts(ah);
30