wlan: Stop connection in progress STA when SAP comes up

Propagation from qcacld-3.0 to prima.

For STA+SAP concurrency support from GUI, first STA connection gets
triggered and while it is in progress, SAP start also comes up. Once
STA association is successful, STA connect event is sent to kernel which
gets queued in kernel workqueue and supplicant won't process M1 received
from AP and send M2 until this NL80211_CONNECT event is received. Workqueue
is not scheduled as RTNL lock is already taken by hostapd thread which has
issued start_bss command to driver. Driver cannot complete start_bss as the
pending command at the head of the SME command pending list is
hw_mode_update for STA session which cannot be processed as SME is in
WAITforKey state for STA interface. The start_bss command for SAP interface
is queued behind the hw_mode_update command and so it cannot be processed
until hw_mode_update command is processed. This causes a deadlock.

Disconnect STA interface first if connection or key exchange is in progress
and then start SAP interface to prevent this deadlock condition.

Change-Id: I2ef5fe0e3bc84e721e6a2baa0dae81c6106c5a8f
CRs-Fixed: 2260683
4 files changed
tree: 94051fae537a6d498a57f3c01d7550ce80433fa1
  1. CORE/
  2. firmware_bin/
  3. riva/
  4. Android.mk
  5. Kbuild
  6. Kconfig
  7. Makefile