diff options
| author | Bjoern A. Zeeb <bz@FreeBSD.org> | 2026-04-17 02:40:03 +0000 |
|---|---|---|
| committer | Bjoern A. Zeeb <bz@FreeBSD.org> | 2026-04-18 01:12:11 +0000 |
| commit | 99bbfb77e3c395805fe0a7f19006c5c29136f9fc (patch) | |
| tree | 8d37e42f3d0c1a93c5fd4b18d47b1482d23909dd | |
| parent | 9f20a4ebf044eb0cab83397c83f13bb3958abf6a (diff) | |
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
| -rw-r--r-- | sys/contrib/dev/rtw89/core.c | 4 |
1 files changed, 4 insertions, 0 deletions
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); |
