- Add IWM_FLAG_SCAN_RUNNING to sc->sc_flags to track whether the firmware is currently running a scan, in order to decide wheter iwm_scan_end needs to abort a running scan.
- In iwm_scan_end, if the scan is still running, we now abort it, in order to keep the firmware scanning state in sync.
- Try to make things a bit simpler, by reacting on the IWM_SCAN_OFFLOAD_COMPLETE and IWM_SCAN_COMPLETE_UMAC notifications, instead of IWM_SCAN_ITERATION_COMPLETE and IWM_SCAN_ITERATION_COMPLETE_UMAC. This should be fine since we always only tell the firmware to do a single scan iteration anyway.
- With this change, I can start multiple scan request via "ifconfig wlan0 scan" in quick succession without triggering a firmware panic as before this change.