Date: Wed, 15 Jun 2011 15:07:01 +0000 (UTC) From: Adrian Chadd <adrian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r223112 - user/adrian/if_ath_tx/sys/dev/ath Message-ID: <201106151507.p5FF71if086936@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: adrian Date: Wed Jun 15 15:07:01 2011 New Revision: 223112 URL: http://svn.freebsd.org/changeset/base/223112 Log: Don't assign sequence numbers if AMPDU-TX is in negotiation phase. net80211 only stops assigning its own sequence numbers once AMPDU-TX has finished being negotiated. It otherwise tags packets with sequence numbers. My previous patch was skipping every other sequence number during the ADDBA exchange and causing the receiver to get throughly confused for a bit. With this patch the receiver now doesn't receive such badly sequenced packets. There are still issues though with the addba BA win start versus what's already been software queued. Packets in the software queue have sequence numbers from -before- the BA window advertised in the ADDBA but are being held and arrive after the ADDBA exchange has occured. Crazy, but true. 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 Wed Jun 15 14:48:42 2011 (r223111) +++ user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c Wed Jun 15 15:07:01 2011 (r223112) @@ -926,7 +926,8 @@ ath_tx_start(struct ath_softc *sc, struc struct ath_txq *txq; int ismcast; const struct ieee80211_frame *wh; - int is_ampdu = 0; + int is_ampdu, is_ampdu_tx, is_ampdu_pending; + ieee80211_seq seqno; /* Determine the target hardware queue! */ pri = M_WME_GETAC(m0); /* honor classification */ @@ -936,9 +937,9 @@ ath_tx_start(struct ath_softc *sc, struc ismcast = IEEE80211_IS_MULTICAST(wh->i_addr1); /* A-MPDU TX */ - if ((ath_tx_ampdu_running(sc, ATH_NODE(ni), tid)) || - (ath_tx_ampdu_pending(sc, ATH_NODE(ni), tid))) - is_ampdu = 1; + is_ampdu_tx = ath_tx_ampdu_running(sc, ATH_NODE(ni), tid); + is_ampdu_pending = ath_tx_ampdu_pending(sc, ATH_NODE(ni), tid); + is_ampdu = is_ampdu_tx | is_ampdu_pending; DPRINTF(sc, ATH_DEBUG_SW_TX, "%s: tid=%d, ac=%d, is_ampdu=%d\n", __func__, tid, pri, is_ampdu); @@ -952,8 +953,9 @@ ath_tx_start(struct ath_softc *sc, struc /* Do the generic frame setup */ /* A-MPDU TX? Manually set sequence number */ - if (is_ampdu) - (void) ath_tx_tid_seqno_assign(sc, ni, bf, m0); + /* Don't do it whilst pending; the net80211 layer still assigns them */ + if (is_ampdu_tx) + seqno = ath_tx_tid_seqno_assign(sc, ni, bf, m0); /* This also sets up the DMA map */ r = ath_tx_normal_setup(sc, ni, bf, m0);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201106151507.p5FF71if086936>