qcacld-3.0: Issue disconnect on STA while start/stop SAP
For STA+SAP/GO concurrency support from GUI, In case if START/STOP AP/GO request comes just before the SAE authentication completion on STA, SAE AUTH REQ waits for START/STOP AP RSP and START/STOP AP RSP waits to complete SAE AUTH REQ. Driver completes START/STOP AP RSP only upon SAE AUTH REQ timeout(5 sec) as start/stop ap will be in serialization pending queue, and SAE auth sequence cannot complete as hostap thread is blocked in start/stop ap cfg80211 ops. To avoid above deadlock until SAE timeout, abort the SAE connection immediately and complete START/STOP AP/GO asap so that the upper layer can trigger a fresh connection after START/STOP AP/GO completion. Change-Id: I96de1bb27dfc669ccf920a90cf86a3cb54e68354 CRs-Fixed: 3452943
This commit is contained in:

committed by
Rahul Choudhary

parent
8b5d4a4cc4
commit
745eadeca0
@@ -267,6 +267,16 @@ hdd_get_sta_connection_in_progress(struct hdd_context *hdd_ctx);
|
||||
*/
|
||||
void hdd_abort_ongoing_sta_connection(struct hdd_context *hdd_ctx);
|
||||
|
||||
/**
|
||||
* hdd_abort_ongoing_sta_sae_connection() - Disconnect the sta for which the
|
||||
* sae connection is in progress.
|
||||
*
|
||||
* @hdd_ctx: hdd context
|
||||
*
|
||||
* Return: none
|
||||
*/
|
||||
void hdd_abort_ongoing_sta_sae_connection(struct hdd_context *hdd_ctx);
|
||||
|
||||
/**
|
||||
* hdd_is_any_sta_connected() - check if any sta in connected state
|
||||
* @hdd_ctx: hdd context
|
||||
|
@@ -583,6 +583,38 @@ void hdd_abort_ongoing_sta_connection(struct hdd_context *hdd_ctx)
|
||||
REASON_UNSPEC_FAILURE, false);
|
||||
}
|
||||
|
||||
void hdd_abort_ongoing_sta_sae_connection(struct hdd_context *hdd_ctx)
|
||||
{
|
||||
struct wlan_hdd_link_info *link_info;
|
||||
struct wlan_objmgr_vdev *vdev;
|
||||
int32_t key_mgmt;
|
||||
|
||||
link_info = hdd_get_sta_connection_in_progress(hdd_ctx);
|
||||
if (!link_info)
|
||||
return;
|
||||
|
||||
vdev = hdd_objmgr_get_vdev_by_user(link_info->adapter->deflink,
|
||||
WLAN_OSIF_ID);
|
||||
if (!vdev)
|
||||
return;
|
||||
|
||||
key_mgmt = wlan_crypto_get_param(vdev, WLAN_CRYPTO_PARAM_KEY_MGMT);
|
||||
hdd_objmgr_put_vdev_by_user(vdev, WLAN_OSIF_ID);
|
||||
|
||||
if (key_mgmt < 0) {
|
||||
hdd_debug_rl("Invalid key_mgmt: %d", key_mgmt);
|
||||
return;
|
||||
}
|
||||
|
||||
if (QDF_HAS_PARAM(key_mgmt, WLAN_CRYPTO_KEY_MGMT_SAE) ||
|
||||
QDF_HAS_PARAM(key_mgmt, WLAN_CRYPTO_KEY_MGMT_FT_SAE) ||
|
||||
QDF_HAS_PARAM(key_mgmt, WLAN_CRYPTO_KEY_MGMT_SAE_EXT_KEY) ||
|
||||
QDF_HAS_PARAM(key_mgmt, WLAN_CRYPTO_KEY_MGMT_FT_SAE_EXT_KEY))
|
||||
wlan_hdd_cm_issue_disconnect(link_info->adapter->deflink,
|
||||
REASON_DISASSOC_NETWORK_LEAVING,
|
||||
false);
|
||||
}
|
||||
|
||||
QDF_STATUS hdd_get_first_connected_sta_vdev_id(struct hdd_context *hdd_ctx,
|
||||
uint32_t *vdev_id)
|
||||
{
|
||||
|
@@ -6301,6 +6301,21 @@ int wlan_hdd_cfg80211_start_bss(struct wlan_hdd_link_info *link_info,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* For STA+SAP/GO concurrency support from GUI, In case if
|
||||
* START AP/GO request comes just before the SAE authentication
|
||||
* completion on STA, SAE AUTH REQ waits for START AP RSP and
|
||||
* START AP RSP waits to complete SAE AUTH REQ.
|
||||
* Driver completes START AP RSP only upon SAE AUTH REQ timeout(5 sec)
|
||||
* as start ap will be in serialization pending queue, and SAE auth
|
||||
* sequence cannot complete as hostap thread is blocked in start ap
|
||||
* cfg80211 ops.
|
||||
* To avoid above deadlock until SAE timeout, abort the SAE connection
|
||||
* immediately and complete START AP/GO asap so that the upper layer
|
||||
* can trigger a fresh connection after START AP/GO completion.
|
||||
*/
|
||||
hdd_abort_ongoing_sta_sae_connection(hdd_ctx);
|
||||
|
||||
mac_handle = hdd_ctx->mac_handle;
|
||||
|
||||
sme_config = qdf_mem_malloc(sizeof(*sme_config));
|
||||
@@ -7057,6 +7072,21 @@ static int __wlan_hdd_cfg80211_stop_ap(struct wiphy *wiphy,
|
||||
goto exit;
|
||||
}
|
||||
|
||||
/*
|
||||
* For STA+SAP/GO concurrency support from GUI, In case if
|
||||
* STOP AP/GO request comes just before the SAE authentication
|
||||
* completion on STA, SAE AUTH REQ waits for STOP AP RSP and
|
||||
* STOP AP RSP waits to complete SAE AUTH REQ.
|
||||
* Driver completes STOP AP RSP only upon SAE AUTH REQ timeout(5 sec)
|
||||
* as stop ap will be in serialization pending queue, and SAE auth
|
||||
* sequence cannot complete as hostap thread is blocked in stop ap
|
||||
* cfg80211 ops.
|
||||
* To avoid above deadlock until SAE timeout, abort the SAE connection
|
||||
* immediately and complete STOP AP/GO asap so that the upper layer
|
||||
* can trigger a fresh connection after STOP AP/GO completion.
|
||||
*/
|
||||
hdd_abort_ongoing_sta_sae_connection(hdd_ctx);
|
||||
|
||||
/* Clear SOFTAP_INIT_DONE flag to mark stop_ap deinit. So that we do
|
||||
* not restart SAP after SSR as SAP is already stopped from user space.
|
||||
* This update is moved to start of this function to resolve stop_ap
|
||||
|
Reference in New Issue
Block a user