CVSROOT:        /cvs
Module name:    src
Changes by:     [email protected]    2026/05/19 04:06:35

Modified files:
        sys/dev/ic     : qwx.c 

Log message:
Ensure no new tasks get scheduled while IFF_RUNNING is set in qwx_stop().

This should prevent a crash I've seen happen once where the newstate task
was scheduled after an incoming auth response frame while userland was in
qwx_stop() (i.e. ifconfig qwx0 down). The newstate task then crashed
because qwx_stop() had already begun to tear down driver state.

Fix interlock between the (badly named) CRASH_FLUSH flag which prevents
new tasks, and IFF_RUNNING which indicates whether the device is ready.
qwx_stop() now clears IFF_RUNNING before the CRASH_FLUSH flag is cleared.
There was a small window in qwx_stop() where IFF_RUNNING was still set
while CRASH_FLUSH was clear again.

To make this work with PMF we need to send our good-bye deauth frame earlier
since sending management frames requires IFF_RUNNING to be set.

Reply via email to