From f9748b9d0dd2c393ec4db5204df2959132254cac Mon Sep 17 00:00:00 2001 From: Sam Leffler Date: Thu, 9 Feb 2006 22:34:34 +0000 Subject: 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 --- sys/dev/ath/if_ath.c | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) (limited to 'sys/dev/ath') diff --git a/sys/dev/ath/if_ath.c b/sys/dev/ath/if_ath.c index 1940044662c9..9269f5fa2f5b 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 -- cgit v1.3