The patch fixes a bug which causes sending spurious frames after bringing VAP's interface up/down, but before association when operating in multi-VAP mode. It was caused by enforcing an ieee80211 machine state transition S_INIT -> S_RUN on a VAP if there were other VAPs already running on the device. Such a transition appears not to be invalid only for M_MONITOR, M_WDS and M_HOSTAP modes.
Additionally, a special care is now taken to treat monitor interfaces differently, when counting running and/or scanning vaps, what avoids kernel oopses due to uninitialised data structures.
http: //dev.lintrack.org/browser/trunk/packages/madwifi/patches/005-state_machine_sta_init-run_fix.diff.bz2?format=raw
Signed-off-by: Michal Wrobel <xmxwx@asn.pl>