1 diff -ur madwifi.old/ath/if_ath.c madwifi.dev/ath/if_ath.c
2 --- madwifi.old/ath/if_ath.c 2007-06-01 16:44:25.170898128 +0200
3 +++ madwifi.dev/ath/if_ath.c 2007-06-01 20:01:24.205131816 +0200
5 /* NB: use this lock to protect an->an_ff_txbuf in athff_can_aggregate()
8 - ATH_TXQ_LOCK_IRQ(txq);
9 + ATH_TXQ_LOCK_BH(txq);
10 if (athff_can_aggregate(sc, eh, an, skb, vap->iv_fragthreshold, &ff_flush)) {
11 if (an->an_tx_ffbuf[skb->priority]) { /* i.e., frame on the staging queue */
12 bf = an->an_tx_ffbuf[skb->priority];
14 /* get (and remove) the frame from staging queue */
15 TAILQ_REMOVE(&txq->axq_stageq, bf, bf_stagelist);
16 an->an_tx_ffbuf[skb->priority] = NULL;
17 + ATH_TXQ_UNLOCK_BH(txq);
20 * chain skbs and add FF magic
23 ATH_HARDSTART_GET_TX_BUF_WITH_LOCK;
25 - ATH_TXQ_UNLOCK_IRQ_EARLY(txq);
26 + ATH_TXQ_UNLOCK_BH(txq);
29 DPRINTF(sc, ATH_DEBUG_XMIT | ATH_DEBUG_FF,
31 an->an_tx_ffbuf[skb->priority] = bf;
33 TAILQ_INSERT_HEAD(&txq->axq_stageq, bf, bf_stagelist);
35 - ATH_TXQ_UNLOCK_IRQ_EARLY(txq);
36 + ATH_TXQ_UNLOCK_BH(txq);
40 @@ -2650,12 +2650,12 @@
42 ATH_HARDSTART_GET_TX_BUF_WITH_LOCK;
44 - ATH_TXQ_UNLOCK_IRQ_EARLY(txq);
45 + ATH_TXQ_UNLOCK_BH(txq);
48 + ATH_TXQ_UNLOCK_BH(txq);
51 - ATH_TXQ_UNLOCK_IRQ(txq);
55 diff -ur madwifi.old/ath/if_athvar.h madwifi.dev/ath/if_athvar.h
56 --- madwifi.old/ath/if_athvar.h 2007-06-01 16:44:25.149901320 +0200
57 +++ madwifi.dev/ath/if_athvar.h 2007-06-01 20:00:06.916881416 +0200
59 #define ATH_TXQ_INTR_PERIOD 5 /* axq_intrcnt period for intr gen */
60 #define ATH_TXQ_LOCK_INIT(_tq) spin_lock_init(&(_tq)->axq_lock)
61 #define ATH_TXQ_LOCK_DESTROY(_tq)
62 +#define ATH_TXQ_LOCK_BH(_tq) spin_lock_bh(&(_tq)->axq_lock);
63 +#define ATH_TXQ_UNLOCK_BH(_tq) spin_unlock_bh(&(_tq)->axq_lock);
64 #define ATH_TXQ_LOCK_IRQ(_tq) do { \
65 unsigned long __axq_lockflags; \
66 spin_lock_irqsave(&(_tq)->axq_lock, __axq_lockflags);