diff options
author | adrian <adrian@FreeBSD.org> | 2011-05-04 02:23:59 +0000 |
---|---|---|
committer | adrian <adrian@FreeBSD.org> | 2011-05-04 02:23:59 +0000 |
commit | 198275796f7dffd23dcf54481b3b8fb395cf877b (patch) | |
tree | 2c10c692ad321ba67c135201cbef081aa5b6043d /sys/net80211/ieee80211_mesh.c | |
parent | a51881ba59b64a8ecc1f846d8b7abcbec1c25a36 (diff) | |
download | FreeBSD-src-198275796f7dffd23dcf54481b3b8fb395cf877b.zip FreeBSD-src-198275796f7dffd23dcf54481b3b8fb395cf877b.tar.gz |
Fix some corner cases in the net80211 sequence number retransmission
handling.
The current sequence number code does a few things incorrectly:
* It didn't try eliminating duplications from HT nodes. I guess it's assumed
that out of order / retransmission handling would be handled by the AMPDU RX
routines. If a HT node isn't doing AMPDU RX, then retransmissions need to
be eliminated. Since most of my debugging is based on this (as AMPDU TX
software packet aggregation isn't yet handled), handle this corner case.
* When a sequence number of 4095 was received, any subsequent sequence number
is going to be (by definition) less than 4095. So if the following sequence
number (0) doesn't initially occur and the retransmit is received, it's
incorrectly eliminated by the IEEE80211_FC1_RETRY && SEQ_LEQ() check.
Try to handle this better.
This almost completely eliminates out of order TCP statistics showing up during
iperf testing for the 11a, 11g and non-aggregate 11n AMPDU RX case. The only
other packet loss conditions leading to this are due to baseband resets or
heavy interference.
Diffstat (limited to 'sys/net80211/ieee80211_mesh.c')
-rw-r--r-- | sys/net80211/ieee80211_mesh.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/sys/net80211/ieee80211_mesh.c b/sys/net80211/ieee80211_mesh.c index 4cf2aac..571a733 100644 --- a/sys/net80211/ieee80211_mesh.c +++ b/sys/net80211/ieee80211_mesh.c @@ -1040,7 +1040,6 @@ mesh_isucastforme(struct ieee80211vap *vap, const struct ieee80211_frame *wh, static int mesh_input(struct ieee80211_node *ni, struct mbuf *m, int rssi, int nf) { -#define SEQ_LEQ(a,b) ((int)((a)-(b)) <= 0) #define HAS_SEQ(type) ((type & 0x4) == 0) struct ieee80211vap *vap = ni->ni_vap; struct ieee80211com *ic = ni->ni_ic; @@ -1094,9 +1093,7 @@ mesh_input(struct ieee80211_node *ni, struct mbuf *m, int rssi, int nf) TID_TO_WME_AC(tid) >= WME_AC_VI) ic->ic_wme.wme_hipri_traffic++; rxseq = le16toh(*(uint16_t *)wh->i_seq); - if ((ni->ni_flags & IEEE80211_NODE_HT) == 0 && - (wh->i_fc[1] & IEEE80211_FC1_RETRY) && - SEQ_LEQ(rxseq, ni->ni_rxseqs[tid])) { + if (! ieee80211_check_rxseq(ni, wh)) { /* duplicate, discard */ IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_INPUT, wh->i_addr1, "duplicate", |