diff options
author | Luis R. Rodriguez <lrodriguez@atheros.com> | 2008-10-22 16:28:43 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-10-31 19:00:52 -0400 |
commit | b139a10a0aaf3c8041af348c2268d59e1610dc83 (patch) | |
tree | 2229616b5de61af9408c8ed60478b692327c9697 | |
parent | d9d2925713d92bbe33b2edff3d7de1ce5646ab54 (diff) |
ath9k: remove pointless sc_txintrperiod and spin_lock_bh on tx prepare
sc_txintrperiod is currently set to 0 and never updated. We won't
be using this, if anything we will consider using TX interrupt
mitigation but that is different and not yet tested. So remove
sc_txintrperiod and the pointless spin_lock_bh() on tx prepare.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/ath9k/ath9k.h | 13 | ||||
-rw-r--r-- | drivers/net/wireless/ath9k/core.h | 4 | ||||
-rw-r--r-- | drivers/net/wireless/ath9k/xmit.c | 27 |
3 files changed, 15 insertions, 29 deletions
diff --git a/drivers/net/wireless/ath9k/ath9k.h b/drivers/net/wireless/ath9k/ath9k.h index accace5f7efb..a6063dea0fa2 100644 --- a/drivers/net/wireless/ath9k/ath9k.h +++ b/drivers/net/wireless/ath9k/ath9k.h | |||
@@ -138,6 +138,19 @@ struct ath_desc { | |||
138 | #define ATH9K_TXDESC_NOACK 0x0002 | 138 | #define ATH9K_TXDESC_NOACK 0x0002 |
139 | #define ATH9K_TXDESC_RTSENA 0x0004 | 139 | #define ATH9K_TXDESC_RTSENA 0x0004 |
140 | #define ATH9K_TXDESC_CTSENA 0x0008 | 140 | #define ATH9K_TXDESC_CTSENA 0x0008 |
141 | /* ATH9K_TXDESC_INTREQ forces a tx interrupt to be generated for | ||
142 | * the descriptor its marked on. We take a tx interrupt to reap | ||
143 | * descriptors when the h/w hits an EOL condition or | ||
144 | * when the descriptor is specifically marked to generate | ||
145 | * an interrupt with this flag. Descriptors should be | ||
146 | * marked periodically to insure timely replenishing of the | ||
147 | * supply needed for sending frames. Defering interrupts | ||
148 | * reduces system load and potentially allows more concurrent | ||
149 | * work to be done but if done to aggressively can cause | ||
150 | * senders to backup. When the hardware queue is left too | ||
151 | * large rate control information may also be too out of | ||
152 | * date. An Alternative for this is TX interrupt mitigation | ||
153 | * but this needs more testing. */ | ||
141 | #define ATH9K_TXDESC_INTREQ 0x0010 | 154 | #define ATH9K_TXDESC_INTREQ 0x0010 |
142 | #define ATH9K_TXDESC_VEOL 0x0020 | 155 | #define ATH9K_TXDESC_VEOL 0x0020 |
143 | #define ATH9K_TXDESC_EXT_ONLY 0x0040 | 156 | #define ATH9K_TXDESC_EXT_ONLY 0x0040 |
diff --git a/drivers/net/wireless/ath9k/core.h b/drivers/net/wireless/ath9k/core.h index 59d835b72cd8..fbff9aa4c28f 100644 --- a/drivers/net/wireless/ath9k/core.h +++ b/drivers/net/wireless/ath9k/core.h | |||
@@ -443,9 +443,6 @@ struct ath_txq { | |||
443 | u8 axq_aggr_depth; /* aggregates queued */ | 443 | u8 axq_aggr_depth; /* aggregates queued */ |
444 | u32 axq_totalqueued; /* total ever queued */ | 444 | u32 axq_totalqueued; /* total ever queued */ |
445 | 445 | ||
446 | /* count to determine if descriptor should generate int on this txq. */ | ||
447 | u32 axq_intrcnt; | ||
448 | |||
449 | bool stopped; /* Is mac80211 queue stopped ? */ | 446 | bool stopped; /* Is mac80211 queue stopped ? */ |
450 | struct ath_buf *axq_linkbuf; /* virtual addr of last buffer*/ | 447 | struct ath_buf *axq_linkbuf; /* virtual addr of last buffer*/ |
451 | 448 | ||
@@ -1007,7 +1004,6 @@ struct ath_softc { | |||
1007 | struct ath_txq sc_txq[ATH9K_NUM_TX_QUEUES]; | 1004 | struct ath_txq sc_txq[ATH9K_NUM_TX_QUEUES]; |
1008 | struct ath_descdma sc_txdma; | 1005 | struct ath_descdma sc_txdma; |
1009 | u32 sc_txqsetup; | 1006 | u32 sc_txqsetup; |
1010 | u32 sc_txintrperiod; /* tx interrupt batching */ | ||
1011 | int sc_haltype2q[ATH9K_WME_AC_VO+1]; /* HAL WME AC -> h/w qnum */ | 1007 | int sc_haltype2q[ATH9K_WME_AC_VO+1]; /* HAL WME AC -> h/w qnum */ |
1012 | u16 seq_no; /* TX sequence number */ | 1008 | u16 seq_no; /* TX sequence number */ |
1013 | 1009 | ||
diff --git a/drivers/net/wireless/ath9k/xmit.c b/drivers/net/wireless/ath9k/xmit.c index 9fa395418a6c..8073c71b3a67 100644 --- a/drivers/net/wireless/ath9k/xmit.c +++ b/drivers/net/wireless/ath9k/xmit.c | |||
@@ -286,7 +286,8 @@ static int ath_tx_prepare(struct ath_softc *sc, | |||
286 | 286 | ||
287 | /* Fill flags */ | 287 | /* Fill flags */ |
288 | 288 | ||
289 | txctl->flags |= ATH9K_TXDESC_CLRDMASK; /* needed for crypto errors */ | 289 | txctl->flags |= ATH9K_TXDESC_CLRDMASK /* needed for crypto errors */ |
290 | | ATH9K_TXDESC_INTREQ; /* Generate an interrupt */ | ||
290 | 291 | ||
291 | if (tx_info->flags & IEEE80211_TX_CTL_NO_ACK) | 292 | if (tx_info->flags & IEEE80211_TX_CTL_NO_ACK) |
292 | txctl->flags |= ATH9K_TXDESC_NOACK; | 293 | txctl->flags |= ATH9K_TXDESC_NOACK; |
@@ -363,28 +364,6 @@ static int ath_tx_prepare(struct ath_softc *sc, | |||
363 | rcs[0].tries = ATH_TXMAXTRY; | 364 | rcs[0].tries = ATH_TXMAXTRY; |
364 | } | 365 | } |
365 | 366 | ||
366 | /* | ||
367 | * Determine if a tx interrupt should be generated for | ||
368 | * this descriptor. We take a tx interrupt to reap | ||
369 | * descriptors when the h/w hits an EOL condition or | ||
370 | * when the descriptor is specifically marked to generate | ||
371 | * an interrupt. We periodically mark descriptors in this | ||
372 | * way to insure timely replenishing of the supply needed | ||
373 | * for sending frames. Defering interrupts reduces system | ||
374 | * load and potentially allows more concurrent work to be | ||
375 | * done but if done to aggressively can cause senders to | ||
376 | * backup. | ||
377 | * | ||
378 | * NB: use >= to deal with sc_txintrperiod changing | ||
379 | * dynamically through sysctl. | ||
380 | */ | ||
381 | spin_lock_bh(&txq->axq_lock); | ||
382 | if ((++txq->axq_intrcnt >= sc->sc_txintrperiod)) { | ||
383 | txctl->flags |= ATH9K_TXDESC_INTREQ; | ||
384 | txq->axq_intrcnt = 0; | ||
385 | } | ||
386 | spin_unlock_bh(&txq->axq_lock); | ||
387 | |||
388 | if (is_multicast_ether_addr(hdr->addr1)) { | 367 | if (is_multicast_ether_addr(hdr->addr1)) { |
389 | antenna = sc->sc_mcastantenna + 1; | 368 | antenna = sc->sc_mcastantenna + 1; |
390 | sc->sc_mcastantenna = (sc->sc_mcastantenna + 1) & 0x1; | 369 | sc->sc_mcastantenna = (sc->sc_mcastantenna + 1) & 0x1; |
@@ -1166,7 +1145,6 @@ static int ath_tx_processq(struct ath_softc *sc, struct ath_txq *txq) | |||
1166 | nacked = 0; | 1145 | nacked = 0; |
1167 | for (;;) { | 1146 | for (;;) { |
1168 | spin_lock_bh(&txq->axq_lock); | 1147 | spin_lock_bh(&txq->axq_lock); |
1169 | txq->axq_intrcnt = 0; /* reset periodic desc intr count */ | ||
1170 | if (list_empty(&txq->axq_q)) { | 1148 | if (list_empty(&txq->axq_q)) { |
1171 | txq->axq_link = NULL; | 1149 | txq->axq_link = NULL; |
1172 | txq->axq_linkbuf = NULL; | 1150 | txq->axq_linkbuf = NULL; |
@@ -2164,7 +2142,6 @@ struct ath_txq *ath_txq_setup(struct ath_softc *sc, int qtype, int subtype) | |||
2164 | txq->axq_depth = 0; | 2142 | txq->axq_depth = 0; |
2165 | txq->axq_aggr_depth = 0; | 2143 | txq->axq_aggr_depth = 0; |
2166 | txq->axq_totalqueued = 0; | 2144 | txq->axq_totalqueued = 0; |
2167 | txq->axq_intrcnt = 0; | ||
2168 | txq->axq_linkbuf = NULL; | 2145 | txq->axq_linkbuf = NULL; |
2169 | sc->sc_txqsetup |= 1<<qnum; | 2146 | sc->sc_txqsetup |= 1<<qnum; |
2170 | } | 2147 | } |