This patch fixes a bug which caused sending spurious frames like:
- IPv6 Neighbor Discovery / Listener Report Message packets (broadcast to
invalid BSSID 00:00:00:00:00:00)
- Disassociate frames (addressed to itself) after bringing VAP's interface
up/down, but before association when operating in multi-VAP mode.
When operating in Infrastructure mode (M_STA) such an operation can be
considered as transmitting without receiving prior enabling signal (i.e.
Beacon Frame) from master device (AP) what violates ETSI EN 301 893
The bug 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. Implications of both the original and fixed transition
enforcement on multi-VAP operation in modes other than M_STA together with
M_MONITOR has not been tested yet.
Update:
There are a few other bugs connected to invalid state transitions. They occur
on VAP's state changes when there is already a monitor VAP running. A few of
them lead to kernel oopses due to uninitialised data structures.
This update to the patch is a quick workaround that skips monitor VAPs while
counting already running VAPs so that the critical state transitions are not
missed anymore.
Signed-off-by: Michal Wrobel <xmxwx@asn.pl>