fix a small race condition in the madwifi queue handling
[openwrt-10.03/.git] / package / madwifi / patches / 327-queue.patch
1 Index: madwifi-trunk-r3280/ath/if_ath.c
2 ===================================================================
3 --- madwifi-trunk-r3280.orig/ath/if_ath.c       2008-01-29 17:57:02.738327980 +0100
4 +++ madwifi-trunk-r3280/ath/if_ath.c    2008-01-29 17:57:02.770329801 +0100
5 @@ -8336,8 +8336,6 @@
6         ath_hal_intrset(sc->sc_ah, sc->sc_imask);
7         local_irq_restore(flags);
8  
9 -       netif_wake_queue(dev);
10 -
11         if (sc->sc_softled)
12                 ath_led_event(sc, ATH_LED_TX);
13  }
14 @@ -8384,8 +8382,6 @@
15         ath_hal_intrset(sc->sc_ah, sc->sc_imask);
16         local_irq_restore(flags);
17  
18 -       netif_wake_queue(dev);
19 -
20         if (sc->sc_softled)
21                 ath_led_event(sc, ATH_LED_TX);
22  }
23 @@ -8418,8 +8414,6 @@
24         ath_hal_intrset(sc->sc_ah, sc->sc_imask);
25         local_irq_restore(flags);
26  
27 -       netif_wake_queue(dev);
28 -
29         if (sc->sc_softled)
30                 ath_led_event(sc, ATH_LED_TX);
31  }
32 Index: madwifi-trunk-r3280/net80211/ieee80211_input.c
33 ===================================================================
34 --- madwifi-trunk-r3280.orig/net80211/ieee80211_input.c 2008-01-29 17:57:29.147832972 +0100
35 +++ madwifi-trunk-r3280/net80211/ieee80211_input.c      2008-01-29 17:58:27.315147737 +0100
36 @@ -1136,7 +1136,7 @@
37             (vap->iv_flags & IEEE80211_F_NOBRIDGE) == 0) {
38                 struct sk_buff *skb1 = NULL;
39  
40 -               if (ETHER_IS_MULTICAST(eh->ether_dhost)) {
41 +               if (ETHER_IS_MULTICAST(eh->ether_dhost) && !netif_queue_stopped(dev)) {
42                         /* Create a SKB for the BSS to send out. */
43                         skb1 = skb_copy(skb, GFP_ATOMIC);
44                         if (skb1)