HomeFreeBSD

LinuxKPI: 802.11: change teardown order to avoid iwlwifi firmware crashes

Description

LinuxKPI: 802.11: change teardown order to avoid iwlwifi firmware crashes

While the previous order worked well for iwlwifi 22000 and later chipsets
(AXxxx, BE200), earlier chipsets had trouble and ran into firmware crashes.
Change the teardown order to avoid these problems. The inline comments
in lkpi_sta_run_to_init() (and lkpi_disassoc()) try to document the new
order and also the old problems we were seeing (too early sta removal or
silent non-removal) leading to follow-up problems.

There is a possible further problem still lingering but a lot harder to
trigger (see comment in review) and likely related to some other doings
so we'll track it separately.

Sponsored by: The FreeBSD Foundation
PR: 275255
Tested with: AX210, 8265 (bz); 9260 (Bakul Shah)
Differential Revision: https://reviews.freebsd.org/D45293

(cherry picked from commit 5a4d24610fc6143ac1d570fe2b5160e8ae893c2c)