2007-11-07 15:02:09 +02:00
|
|
|
Index: madwifi-ng-r2834-20071106/ath/if_ath.c
|
2007-06-04 14:25:53 +03:00
|
|
|
===================================================================
|
2007-11-07 15:02:09 +02:00
|
|
|
--- madwifi-ng-r2834-20071106.orig/ath/if_ath.c 2007-11-07 14:02:04.865648150 +0100
|
|
|
|
+++ madwifi-ng-r2834-20071106/ath/if_ath.c 2007-11-07 14:02:05.117662515 +0100
|
2007-10-24 07:35:02 +03:00
|
|
|
@@ -2693,7 +2693,7 @@
|
2007-07-04 00:03:58 +03:00
|
|
|
/* NB: use this lock to protect an->an_tx_ffbuf (and txq->axq_stageq)
|
|
|
|
* in athff_can_aggregate() call too.
|
2007-06-01 21:25:33 +03:00
|
|
|
*/
|
|
|
|
- ATH_TXQ_LOCK_IRQ(txq);
|
|
|
|
+ ATH_TXQ_LOCK_BH(txq);
|
|
|
|
if (athff_can_aggregate(sc, eh, an, skb, vap->iv_fragthreshold, &ff_flush)) {
|
|
|
|
if (an->an_tx_ffbuf[skb->priority]) { /* i.e., frame on the staging queue */
|
|
|
|
bf = an->an_tx_ffbuf[skb->priority];
|
2007-10-24 07:35:02 +03:00
|
|
|
@@ -2701,6 +2701,7 @@
|
2007-06-01 21:25:33 +03:00
|
|
|
/* get (and remove) the frame from staging queue */
|
|
|
|
TAILQ_REMOVE(&txq->axq_stageq, bf, bf_stagelist);
|
|
|
|
an->an_tx_ffbuf[skb->priority] = NULL;
|
|
|
|
+ ATH_TXQ_UNLOCK_BH(txq);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* chain skbs and add FF magic
|
2007-10-24 07:35:02 +03:00
|
|
|
@@ -2723,7 +2724,7 @@
|
2007-06-01 21:25:33 +03:00
|
|
|
*/
|
|
|
|
ATH_HARDSTART_GET_TX_BUF_WITH_LOCK;
|
|
|
|
if (bf == NULL) {
|
|
|
|
- ATH_TXQ_UNLOCK_IRQ_EARLY(txq);
|
|
|
|
+ ATH_TXQ_UNLOCK_BH(txq);
|
|
|
|
goto hardstart_fail;
|
|
|
|
}
|
|
|
|
DPRINTF(sc, ATH_DEBUG_XMIT | ATH_DEBUG_FF,
|
2007-10-24 07:35:02 +03:00
|
|
|
@@ -2735,8 +2736,7 @@
|
2007-06-01 21:25:33 +03:00
|
|
|
an->an_tx_ffbuf[skb->priority] = bf;
|
|
|
|
|
|
|
|
TAILQ_INSERT_HEAD(&txq->axq_stageq, bf, bf_stagelist);
|
|
|
|
-
|
|
|
|
- ATH_TXQ_UNLOCK_IRQ_EARLY(txq);
|
|
|
|
+ ATH_TXQ_UNLOCK_BH(txq);
|
|
|
|
|
2007-07-12 00:13:50 +03:00
|
|
|
return NETDEV_TX_OK;
|
2007-06-01 21:25:33 +03:00
|
|
|
}
|
2007-10-24 07:35:02 +03:00
|
|
|
@@ -2749,7 +2749,7 @@
|
2007-07-04 00:03:58 +03:00
|
|
|
an->an_tx_ffbuf[skb->priority] = NULL;
|
|
|
|
|
|
|
|
/* NB: ath_tx_start -> ath_tx_txqaddbuf uses ATH_TXQ_LOCK too */
|
|
|
|
- ATH_TXQ_UNLOCK_IRQ_EARLY(txq);
|
|
|
|
+ ATH_TXQ_UNLOCK_BH(txq);
|
|
|
|
|
|
|
|
/* encap and xmit */
|
|
|
|
bf_ff->bf_skb = ieee80211_encap(ni, bf_ff->bf_skb, &framecnt);
|
2007-10-24 07:35:02 +03:00
|
|
|
@@ -2798,12 +2798,12 @@
|
2007-06-01 21:25:33 +03:00
|
|
|
|
|
|
|
ATH_HARDSTART_GET_TX_BUF_WITH_LOCK;
|
|
|
|
if (bf == NULL) {
|
|
|
|
- ATH_TXQ_UNLOCK_IRQ_EARLY(txq);
|
|
|
|
+ ATH_TXQ_UNLOCK_BH(txq);
|
|
|
|
goto hardstart_fail;
|
|
|
|
}
|
|
|
|
+ ATH_TXQ_UNLOCK_BH(txq);
|
|
|
|
}
|
|
|
|
|
|
|
|
- ATH_TXQ_UNLOCK_IRQ(txq);
|
|
|
|
|
2007-07-04 00:03:58 +03:00
|
|
|
ff_flush_done:
|
2007-06-01 21:25:33 +03:00
|
|
|
ff_bypass:
|
2007-11-07 15:02:09 +02:00
|
|
|
Index: madwifi-ng-r2834-20071106/ath/if_athvar.h
|
2007-06-04 14:25:53 +03:00
|
|
|
===================================================================
|
2007-11-07 15:02:09 +02:00
|
|
|
--- madwifi-ng-r2834-20071106.orig/ath/if_athvar.h 2007-11-07 14:02:04.865648150 +0100
|
|
|
|
+++ madwifi-ng-r2834-20071106/ath/if_athvar.h 2007-11-07 14:02:05.117662515 +0100
|
2007-10-24 07:35:02 +03:00
|
|
|
@@ -504,6 +504,8 @@
|
2007-06-01 21:25:33 +03:00
|
|
|
#define ATH_TXQ_INTR_PERIOD 5 /* axq_intrcnt period for intr gen */
|
|
|
|
#define ATH_TXQ_LOCK_INIT(_tq) spin_lock_init(&(_tq)->axq_lock)
|
|
|
|
#define ATH_TXQ_LOCK_DESTROY(_tq)
|
|
|
|
+#define ATH_TXQ_LOCK_BH(_tq) spin_lock_bh(&(_tq)->axq_lock);
|
|
|
|
+#define ATH_TXQ_UNLOCK_BH(_tq) spin_unlock_bh(&(_tq)->axq_lock);
|
|
|
|
#define ATH_TXQ_LOCK_IRQ(_tq) do { \
|
|
|
|
unsigned long __axq_lockflags; \
|
|
|
|
spin_lock_irqsave(&(_tq)->axq_lock, __axq_lockflags);
|