HomeFreeBSD

net80211: improve logging about state transitions lost

Description

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)

Details

Provenance
bzAuthored on Nov 12 2023, 11:51 PM
Reviewer
cc
Differential Revision
D42560: net80211: improve logging about state transitions lost
Parents
rG804a4c1c7b8f: LinuxKPI: 802.11: more TXQ implementation and locking
Branches
Unknown
Tags
Unknown