|
@@ -7650,6 +7650,7 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter,
|
|
|
bool MFPRequired = false;
|
|
|
uint16_t prev_rsn_length = 0;
|
|
|
enum dfs_mode mode;
|
|
|
+ struct hdd_adapter *sta_adapter;
|
|
|
|
|
|
ENTER();
|
|
|
|
|
@@ -7665,6 +7666,30 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter,
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ /*
|
|
|
+ * 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 is causing a deadlock so
|
|
|
+ * disconnect the STA interface first if connection or key exchange is
|
|
|
+ * in progress and then start SAP interface.
|
|
|
+ */
|
|
|
+ sta_adapter = hdd_get_sta_connection_in_progress(hdd_ctx);
|
|
|
+ if (sta_adapter) {
|
|
|
+ hdd_debug("Disconnecting STA with session id: %d",
|
|
|
+ sta_adapter->session_id);
|
|
|
+ wlan_hdd_disconnect(sta_adapter, eCSR_DISCONNECT_REASON_DEAUTH);
|
|
|
+ }
|
|
|
+
|
|
|
sme_config = qdf_mem_malloc(sizeof(*sme_config));
|
|
|
if (!sme_config) {
|
|
|
hdd_err("failed to allocate memory");
|