From b4fb3d6e022db6d67407756959bc3bdeaf836d59 Mon Sep 17 00:00:00 2001 From: Adrian Chadd Date: Sun, 10 Apr 2016 04:16:34 +0000 Subject: [PATCH] [net80211] correctly (i hope, wow) do a ticks comparison to limit A-MPDU attempts I was seeing the stack constantly attempt to renegotiate A-MPDU TX even after 3 failures. My hunch is that the direct ticks comparison is failing around the ticks wrap-around point. This failure shouldn't /really/ happen normally, but it turns out being the IBSS master node on FreeBSD doesn't quite setup 11n right, so negotiating A-MPDU TX fails. --- sys/net80211/ieee80211_ht.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/net80211/ieee80211_ht.c b/sys/net80211/ieee80211_ht.c index 9d33beb5f29..cf78e8829f0 100644 --- a/sys/net80211/ieee80211_ht.c +++ b/sys/net80211/ieee80211_ht.c @@ -2157,7 +2157,7 @@ ieee80211_ampdu_enable(struct ieee80211_node *ni, return 0; /* XXX check rssi? */ if (tap->txa_attempts >= ieee80211_addba_maxtries && - ticks < tap->txa_nextrequest) { + ieee80211_time_after(ticks, tap->txa_nextrequest)) { /* * Don't retry too often; txa_nextrequest is set * to the minimum interval we'll retry after