summaryrefslogtreecommitdiffstats
path: root/sys/dev/ath
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2006-02-09 22:34:34 +0000
committersam <sam@FreeBSD.org>2006-02-09 22:34:34 +0000
commitd80257d0e91abc112b78164e1114cfcd04d15b63 (patch)
tree4a52948e2b11c6f81caf5f751e2fc7c978de61d3 /sys/dev/ath
parenta3586317ec11509e393cfb010ca1c3a6e9de4833 (diff)
downloadFreeBSD-src-d80257d0e91abc112b78164e1114cfcd04d15b63.zip
FreeBSD-src-d80257d0e91abc112b78164e1114cfcd04d15b63.tar.gz
Minor tx path cleanups:
o assume all data frames have been classified so there's no need to check if QoS is being used, just fetch the wme priority from the mbuf o fix double counting of noack frames o fix nearby comment MFC after: 2 weeks
Diffstat (limited to 'sys/dev/ath')
-rw-r--r--sys/dev/ath/if_ath.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/sys/dev/ath/if_ath.c b/sys/dev/ath/if_ath.c
index 1940044..9269f5f 100644
--- a/sys/dev/ath/if_ath.c
+++ b/sys/dev/ath/if_ath.c
@@ -3304,7 +3304,7 @@ ath_tx_start(struct ath_softc *sc, struct ieee80211_node *ni, struct ath_buf *bf
* Adjust the packet + header lengths for the crypto
* additions and calculate the h/w key index. When
* a s/w mic is done the frame will have had any mic
- * added to it prior to entry so skb->len above will
+ * added to it prior to entry so m0->m_pkthdr.len above will
* account for it. Otherwise we need to add it to the
* packet length.
*/
@@ -3471,17 +3471,9 @@ ath_tx_start(struct ath_softc *sc, struct ieee80211_node *ni, struct ath_buf *bf
if (try0 != ATH_TXMAXTRY)
ismrr = 1;
}
- /*
- * Default all non-QoS traffic to the background queue.
- */
- if (wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_QOS) {
- pri = M_WME_GETAC(m0);
- if (cap->cap_wmeParams[pri].wmep_noackPolicy) {
- flags |= HAL_TXDESC_NOACK;
- sc->sc_stats.ast_tx_noack++;
- }
- } else
- pri = WME_AC_BE;
+ pri = M_WME_GETAC(m0);
+ if (cap->cap_wmeParams[pri].wmep_noackPolicy)
+ flags |= HAL_TXDESC_NOACK;
break;
default:
if_printf(ifp, "bogus frame type 0x%x (%s)\n",
@@ -3507,12 +3499,13 @@ ath_tx_start(struct ath_softc *sc, struct ieee80211_node *ni, struct ath_buf *bf
*/
if (ismcast) {
flags |= HAL_TXDESC_NOACK; /* no ack on broad/multicast */
- sc->sc_stats.ast_tx_noack++;
} else if (pktlen > ic->ic_rtsthreshold) {
flags |= HAL_TXDESC_RTSENA; /* RTS based on frame length */
cix = rt->info[rix].controlRate;
sc->sc_stats.ast_tx_rts++;
}
+ if (flags & HAL_TXDESC_NOACK) /* NB: avoid double counting */
+ sc->sc_stats.ast_tx_noack++;
/*
* If 802.11g protection is enabled, determine whether
OpenPOWER on IntegriCloud