qcacld-3.0: Stop STA if connection in progress and SAP Stop is received
In STA+SAP concurrency, when the STA connection is in progress or set_key is in progress, the set_hw_mode command to SME is queued and would be processed only after the connection is complete. Meanwhile, when a stop SAP is received and SAP Dissassociate STA is triggered from HDD, the command is queued in SME and cannot be processed until STA connection is done. The add_key command from the supplicant is also stuck as the previous stop_ap command is in progress leading to a deadlock. When the AP sends deauth to the STA due to 4 Way Handshake failure, the STA is reset and then the stop SAP command proceeds, followed by another connection for the STA. Disconnect STA interface first if connection or key exchange is in progress and then stop SAP interface to prevent this deadlock condition. Change-Id: I23ad1fc96882abeaae2d1b051659ea6d24b07428 CRs-Fixed: 2187070
This commit is contained in:

committed by
snandini

parent
e8903258b5
commit
dd9cf6259a
@@ -8306,6 +8306,7 @@ static int __wlan_hdd_cfg80211_stop_ap(struct wiphy *wiphy,
|
||||
struct net_device *dev)
|
||||
{
|
||||
struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(dev);
|
||||
struct hdd_adapter *sta_adapter;
|
||||
struct hdd_context *hdd_ctx = wiphy_priv(wiphy);
|
||||
QDF_STATUS status = QDF_STATUS_E_FAILURE;
|
||||
QDF_STATUS qdf_status = QDF_STATUS_E_FAILURE;
|
||||
@@ -8353,6 +8354,18 @@ static int __wlan_hdd_cfg80211_stop_ap(struct wiphy *wiphy,
|
||||
if (0 != ret)
|
||||
return ret;
|
||||
|
||||
/*
|
||||
* If a STA connection is in progress in another adapter, disconnect
|
||||
* the STA and complete the SAP operation. STA will reconnect
|
||||
* after SAP stop is done.
|
||||
*/
|
||||
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);
|
||||
}
|
||||
|
||||
if (adapter->device_mode == QDF_SAP_MODE) {
|
||||
uint8_t num_sessions;
|
||||
|
||||
|
Reference in New Issue
Block a user