1 Index: madwifi-ng-r2525-20070630/ath/if_ath.c
2 ===================================================================
3 --- madwifi-ng-r2525-20070630.orig/ath/if_ath.c 2007-07-03 23:02:32.998106000 +0200
4 +++ madwifi-ng-r2525-20070630/ath/if_ath.c 2007-07-03 23:02:33.302125000 +0200
6 /* NB: use this lock to protect an->an_tx_ffbuf (and txq->axq_stageq)
7 * in athff_can_aggregate() call too.
9 - ATH_TXQ_LOCK_IRQ(txq);
10 + ATH_TXQ_LOCK_BH(txq);
11 if (athff_can_aggregate(sc, eh, an, skb, vap->iv_fragthreshold, &ff_flush)) {
12 if (an->an_tx_ffbuf[skb->priority]) { /* i.e., frame on the staging queue */
13 bf = an->an_tx_ffbuf[skb->priority];
15 /* get (and remove) the frame from staging queue */
16 TAILQ_REMOVE(&txq->axq_stageq, bf, bf_stagelist);
17 an->an_tx_ffbuf[skb->priority] = NULL;
18 + ATH_TXQ_UNLOCK_BH(txq);
21 * chain skbs and add FF magic
24 ATH_HARDSTART_GET_TX_BUF_WITH_LOCK;
26 - ATH_TXQ_UNLOCK_IRQ_EARLY(txq);
27 + ATH_TXQ_UNLOCK_BH(txq);
30 DPRINTF(sc, ATH_DEBUG_XMIT | ATH_DEBUG_FF,
32 an->an_tx_ffbuf[skb->priority] = bf;
34 TAILQ_INSERT_HEAD(&txq->axq_stageq, bf, bf_stagelist);
36 - ATH_TXQ_UNLOCK_IRQ_EARLY(txq);
37 + ATH_TXQ_UNLOCK_BH(txq);
42 an->an_tx_ffbuf[skb->priority] = NULL;
44 /* NB: ath_tx_start -> ath_tx_txqaddbuf uses ATH_TXQ_LOCK too */
45 - ATH_TXQ_UNLOCK_IRQ_EARLY(txq);
46 + ATH_TXQ_UNLOCK_BH(txq);
49 bf_ff->bf_skb = ieee80211_encap(ni, bf_ff->bf_skb, &framecnt);
50 @@ -2674,12 +2674,12 @@
52 ATH_HARDSTART_GET_TX_BUF_WITH_LOCK;
54 - ATH_TXQ_UNLOCK_IRQ_EARLY(txq);
55 + ATH_TXQ_UNLOCK_BH(txq);
58 + ATH_TXQ_UNLOCK_BH(txq);
61 - ATH_TXQ_UNLOCK_IRQ(txq);
65 Index: madwifi-ng-r2525-20070630/ath/if_athvar.h
66 ===================================================================
67 --- madwifi-ng-r2525-20070630.orig/ath/if_athvar.h 2007-07-03 23:02:33.002106250 +0200
68 +++ madwifi-ng-r2525-20070630/ath/if_athvar.h 2007-07-03 23:02:33.302125000 +0200
70 #define ATH_TXQ_INTR_PERIOD 5 /* axq_intrcnt period for intr gen */
71 #define ATH_TXQ_LOCK_INIT(_tq) spin_lock_init(&(_tq)->axq_lock)
72 #define ATH_TXQ_LOCK_DESTROY(_tq)
73 +#define ATH_TXQ_LOCK_BH(_tq) spin_lock_bh(&(_tq)->axq_lock);
74 +#define ATH_TXQ_UNLOCK_BH(_tq) spin_unlock_bh(&(_tq)->axq_lock);
75 #define ATH_TXQ_LOCK_IRQ(_tq) do { \
76 unsigned long __axq_lockflags; \
77 spin_lock_irqsave(&(_tq)->axq_lock, __axq_lockflags);