]> 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>
Fri, 22 Dec 2023 00:19:05 +0000 (00:19 +0000)
commit72bb33a36b62fa30f69f01d3f6ae372be2c95b59
tree7739fb029f433e869d668d0291e8fe94d188c958
parent45438f9c8b5b91ebf5606b4a98e891559913d25b
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.

Sponsored by:   The FreeBSD Foundation
MFC after: 3 days
Reviewed by: cc
Differential Revision: https://reviews.freebsd.org/D42560
sys/net80211/ieee80211_proto.c