- Add phy/mac tasks, the phy task is currently a placeholder
- Add in the MAC methods from net80211 that are called whenever the VAP mode needs updating
- Mark the hardware as STOPPED during shutdown so scheduled tasks don't run
The fun side of this work:
- detaching net80211 causes the parent method to be called which leads to iwm_stop() being called, and at least one of the entry paths into iwm_stop() has IWM_LOCK held, and we can't do a taskqueue_drain() or taskqueue_drain_all() call with any lock held as it will sleep.
- the net80211 detach path is calling at least one of the MAC methods during detach, and since the taskqueue is being deleted /before/ the net80211 detach path, we have to make sure nothing is actually going to do taskqueue work after that!
- STOPPED in FreeBSD is MOSTLY doing the same as SHUTDOWN in OpenBSD. It should be fine enough for this.
Locally tested:
- 7260 STA mode - create, ctrl-C wpa_supplicant; create, destroy; create, unload; create, destroy, unload. The create+unload paths generate interesting net80211 tear down states which were causing issues here.