Add synchronization and switching between WhdSoftAPInterface and WhdSTAInterfaces #11578
Currently, there is no synchronization between STA and SoftAP interfaces which shares the same underlying WHD device. Synchronization mechanism using lock_guard is added to serialize operations including
Also resolved switching issue between SoftAP and STA mode for primary interface
Pull request type
- A shared mutex is added for synchronization - ScopedMutexLock is used to to protect - SoftAP: start, stop - STA: scan, join, disconnect - Fix switching issue between SoftAP and STA mode for primary interface - Avoid reinit primary interface by getting mapping the current interface to the other one which is already on - In concurrent mode, STA is the default if it is up, otherwise SoftAP is default. - For non-concurrent mode, the most recent started interface is set as default.