]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
net80211: improve logging about state transitions lost
authorBjoern A. Zeeb <bz@FreeBSD.org>
Sun, 12 Nov 2023 23:51:14 +0000 (23:51 +0000)
committerBjoern A. Zeeb <bz@FreeBSD.org>
Mon, 19 Feb 2024 16:06:51 +0000 (16:06 +0000)
commitf93d06ac87f4d5f496fe5669dc56b912e11c136e
treeedfffc4d92fac18c73756b631f4d01b69ec4bd4c
parent804a4c1c7b8fe00a6924fa5e4ae27a487bdc2337
net80211: improve logging about state transitions lost

It is possible that we call ieee80211_new_state_locked() again before
a previous task finished to completion (not run yet or unlocked in
between) since 5efea30f039c4 (and follow-up).
In either case we would overwrite the new state and argument in the vap.

While most drivers somehow deal with that (or not), LinuxKPI 802.11 compat
code has KASSERTs to keep net80211, LinuxKPI and driver/firmware state in
sync and they may trigger due to a missing transition or more likely a
changed ni/lsta.

Enhance the wlandebug +state logging for these cases so they
are easier to debug.

While here remove the unconditional logging to the message buffer;
it has been here for a good decade but not helped to actually identify
and sort the problem.

Approved by: re (cperciva)
Sponsored by:   The FreeBSD Foundation
Reviewed by: cc
Differential Revision: https://reviews.freebsd.org/D42560

(cherry picked from commit 72bb33a36b62fa30f69f01d3f6ae372be2c95b59)
(cherry picked from commit a2764047702db519aca9e1b3cf6b475e5a723c65)
sys/net80211/ieee80211_proto.c