iwm - Track firmware state better, and improve handling in iwm_newstate().
authorImre Vadász <imre@vdsz.com>
Sat, 17 Mar 2018 14:48:02 +0000 (15:48 +0100)
committerImre Vadász <imre@vdsz.com>
Sun, 18 Mar 2018 11:25:21 +0000 (12:25 +0100)
commit8a41b10ac639d0609878696808387a6799d39b57
tree93bed0fc31f104f491a5babe2a453051e66fb6d1
parent8122d914c04988d8104e60eddd1027bf3bf4cc29
iwm - Track firmware state better, and improve handling in iwm_newstate().

* This avoids firmware resets in all the cases in iwm_newstate(). Instead
  iwm_bring_down_firmware() is called, which tears down all the STA
  connection state, according to the sc->sc_firmware_state value.

* Improve the behaviour of the LED blinking a bit, so it only blinks when
  there really is a wireless scan going on.

* Print the newstate arg in debug output of iwm_newstate(), to help in
  debugging.

This is inspired by the firmware state maintaining change in OpenBSD's iwm, by
stsp@openbsd.org (OpenBSD Git 0ddb056fb7370664b1d4b84392697cb17d1a414a).
sys/dev/netif/iwm/if_iwm.c
sys/dev/netif/iwm/if_iwm_mac_ctxt.c
sys/dev/netif/iwm/if_iwm_sta.c
sys/dev/netif/iwm/if_iwmvar.h