Updated Dnsmasq to 2.42 (#3498)
[openwrt.git] / package / madwifi / patches / 343-txqueue_races.patch
1 Merged from madwifi trunk r3551, r3552
2
3 Index: madwifi-trunk-r3314/ath/if_ath.c
4 ===================================================================
5 --- madwifi-trunk-r3314.orig/ath/if_ath.c
6 +++ madwifi-trunk-r3314/ath/if_ath.c
7 @@ -8244,6 +8244,17 @@
8 goto bf_fail;
9 }
10
11 + /* We make sure we don't remove the TX descriptor on
12 + * which the HW is pointing since it contains the
13 + * ds_link field, except if this is the last TX
14 + * descriptor in the queue */
15 +
16 + if ((txq->axq_depth > 1) &&
17 + (bf->bf_daddr == ath_hal_gettxbuf(ah, txq->axq_qnum))) {
18 + ATH_TXQ_UNLOCK_IRQ_EARLY(txq);
19 + goto bf_fail;
20 + }
21 +
22 ATH_TXQ_REMOVE_HEAD(txq, bf_list);
23 ATH_TXQ_UNLOCK_IRQ(txq);
24
25 Index: madwifi-trunk-r3314/ath/if_athvar.h
26 ===================================================================
27 --- madwifi-trunk-r3314.orig/ath/if_athvar.h
28 +++ madwifi-trunk-r3314/ath/if_athvar.h
29 @@ -586,7 +586,8 @@
30 } while (0)
31 #define ATH_TXQ_REMOVE_HEAD(_tq, _field) do { \
32 STAILQ_REMOVE_HEAD(&(_tq)->axq_q, _field); \
33 - (_tq)->axq_depth--; \
34 + if (--(_tq)->axq_depth <= 0) \
35 + (_tq)->axq_link = NULL; \
36 } while (0)
37 /* move buffers from MCASTQ to CABQ */
38 #define ATH_TXQ_MOVE_MCASTQ(_tqs,_tqd) do { \
This page took 0.046538 seconds and 5 git commands to generate.