git: 99bbfb77e3c3 - main - rtw89: add a warn about beacon_int or dtim_period being 0
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 18 Apr 2026 01:12:51 UTC
The branch main has been updated by bz:
URL: https://cgit.FreeBSD.org/src/commit/?id=99bbfb77e3c395805fe0a7f19006c5c29136f9fc
commit 99bbfb77e3c395805fe0a7f19006c5c29136f9fc
Author: Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2026-04-17 02:40:03 +0000
Commit: Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2026-04-18 01:12:11 +0000
rtw89: add a warn about beacon_int or dtim_period being 0
While after the changes to LinuxKPI 802.11 we should never be assoc
and not have dtim_period set, we have seen before that this could
happen. Add a WARN as that will help debugging the following DIV 0.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
---
sys/contrib/dev/rtw89/core.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/sys/contrib/dev/rtw89/core.c b/sys/contrib/dev/rtw89/core.c
index aeaf1c8f80c5..1dee73a62f98 100644
--- a/sys/contrib/dev/rtw89/core.c
+++ b/sys/contrib/dev/rtw89/core.c
@@ -2838,6 +2838,10 @@ static void rtw89_core_bcn_track_assoc(struct rtw89_dev *rtwdev,
dtim = bss_conf->dtim_period;
rcu_read_unlock();
+#if defined(__FreeBSD__)
+ WARN(beacon_int == 0 || dtim == 0, "period %u / beacon_int %u / dtim %u\n",
+ period, beacon_int, dtim);
+#endif
beacons_in_period = period / beacon_int / dtim;
bcn_intvl_us = ieee80211_tu_to_usec(beacon_int);