svn commit: r224798 - user/adrian/if_ath_tx/sys/dev/ath
Adrian Chadd
adrian at FreeBSD.org
Fri Aug 12 14:43:38 UTC 2011
Author: adrian
Date: Fri Aug 12 14:43:37 2011
New Revision: 224798
URL: http://svn.freebsd.org/changeset/base/224798
Log:
Don't assign sequence numbers to null qos frames.
This creates a 1 packet hole in the receivers BAW, which causes packets to get received
but put in the reassembly queue.
Modified:
user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c
Modified: user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c
==============================================================================
--- user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c Fri Aug 12 14:26:47 2011 (r224797)
+++ user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c Fri Aug 12 14:43:37 2011 (r224798)
@@ -1627,8 +1627,8 @@ ath_tx_tid_unsched(struct ath_softc *sc,
/*
* Assign a sequence number manually to the given frame.
- *
- * This should only be called for A-MPDU TX frames.
+ *
+ * This should only be called for A-MPDU TX frames.
*/
static ieee80211_seq
ath_tx_tid_seqno_assign(struct ath_softc *sc, struct ieee80211_node *ni,
@@ -1637,6 +1637,7 @@ ath_tx_tid_seqno_assign(struct ath_softc
struct ieee80211_frame *wh;
int tid, pri;
ieee80211_seq seqno;
+ uint8_t subtype;
/* TID lookup */
wh = mtod(m0, struct ieee80211_frame *);
@@ -1645,13 +1646,28 @@ ath_tx_tid_seqno_assign(struct ath_softc
DPRINTF(sc, ATH_DEBUG_SW_TX, "%s: pri=%d, tid=%d, qos has seq=%d\n",
__func__, pri, tid, IEEE80211_QOS_HAS_SEQ(wh));
+ /* XXX Is it a control frame? Ignore */
+
/* Does the packet require a sequence number? */
if (! IEEE80211_QOS_HAS_SEQ(wh))
return -1;
- /* Manually assign sequence number */
- seqno = ni->ni_txseqs[tid];
- INCR(ni->ni_txseqs[tid], IEEE80211_SEQ_RANGE);
+ /*
+ * Is it a QOS NULL Data frame? Give it a sequence number of 0x0.
+ * The RX path of everything I've looked at doesn't include the NULL
+ * data frame sequence number in the aggregation state updates, so
+ * assigning it a sequence number there will cause a BAW hole on the
+ * RX side.
+ */
+ /* XXX use the global sequence number instead? */
+ subtype = wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK;
+ if (subtype == IEEE80211_FC0_SUBTYPE_QOS_NULL) {
+ seqno = 0;
+ } else {
+ /* Manually assign sequence number */
+ seqno = ni->ni_txseqs[tid];
+ INCR(ni->ni_txseqs[tid], IEEE80211_SEQ_RANGE);
+ }
*(uint16_t *)&wh->i_seq[0] = htole16(seqno << IEEE80211_SEQ_SEQ_SHIFT);
M_SEQNO_SET(m0, seqno);
More information about the svn-src-user
mailing list