git: 99b3fd23ef0b - stable/15 - net80211: clean up time comparison in HT code
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 22 Apr 2026 21:07:59 UTC
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;
}