Date: Wed, 22 Apr 2026 21:07:59 +0000 From: Bjoern A. Zeeb <bz@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Adrian Chadd <adrian@FreeBSD.org> Subject: git: 99b3fd23ef0b - stable/15 - net80211: clean up time comparison in HT code Message-ID: <69e938af.26c4a.283cd679@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=99b3fd23ef0bf5428ff65cdb051adc4fdc12b900 commit 99b3fd23ef0bf5428ff65cdb051adc4fdc12b900 Author: Adrian Chadd <adrian@FreeBSD.org> AuthorDate: 2025-12-15 03:45:36 +0000 Commit: Bjoern A. Zeeb <bz@FreeBSD.org> CommitDate: 2026-04-22 20:56:51 +0000 net80211: clean up time comparison in HT code There's at least one place where the time comparison is wrong, leading to some bad beahaviour around deciding to try and establish/reestablish AMPDU TX sessions. Start addressing these! Differential Revision: https://reviews.freebsd.org/D54390 (cherry picked from commit 7a5288a023baeac2f0c3128506178f89fda3cc0d) --- sys/net80211/ieee80211_ht.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sys/net80211/ieee80211_ht.c b/sys/net80211/ieee80211_ht.c index 7817a7d0759d..9b2b0df33785 100644 --- a/sys/net80211/ieee80211_ht.c +++ b/sys/net80211/ieee80211_ht.c @@ -1131,7 +1131,8 @@ again: */ if (rap->rxa_qframes != 0) { /* XXX honor batimeout? */ - if (ticks - rap->rxa_age > ieee80211_ampdu_age) { + if (ieee80211_time_after(ticks - rap->rxa_age, + ieee80211_ampdu_age)) { /* * Too long since we received the first * frame; flush the reorder buffer. @@ -1393,7 +1394,8 @@ ieee80211_ht_node_age(struct ieee80211_node *ni) * See above for more details on what's happening here. */ /* XXX honor batimeout? */ - if (ticks - rap->rxa_age > ieee80211_ampdu_age) { + if (ieee80211_time_after(ticks - rap->rxa_age, + ieee80211_ampdu_age)) { /* * Too long since we received the first * frame; flush the reorder buffer. @@ -2825,7 +2827,7 @@ ieee80211_ampdu_request(struct ieee80211_node *ni, /* defer next try so we don't slam the driver with requests */ tap->txa_attempts = ieee80211_addba_maxtries; /* NB: check in case driver wants to override */ - if (tap->txa_nextrequest <= ticks) + if (ieee80211_time_before_eq(tap->txa_nextrequest, ticks)) tap->txa_nextrequest = ticks + ieee80211_addba_backoff; return 0; }home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69e938af.26c4a.283cd679>
