From d453c18981a91264ac18d7eebd04b67834096033 Mon Sep 17 00:00:00 2001 From: Abhinav Kumar Date: Thu, 28 Nov 2019 20:42:27 +0530 Subject: [PATCH] qcacld-3.0: Enable roaming based on conn status in case of STA + STA In case of STA + STA, If first STA (say STA1) is in connected state and second STA (say STA2) has multiple candidate APs for connection, STA2 tries connection with each APs one by one till either successful a connection or no AP left to initiate connection. Currently, If STA2 initiate connection with first candidate, and if it fails, STA2 enables roaming on other interfaces (here STA1) irrespective of connection status. This results, after connection failure of STA2 with first AP, STA1 gets permission to start roaming. So there could be a possibility that STA1 started roaming on VDEV0 and STA2 started connection with next AP on VDEV1 which results in two VDEV start/re-start at the same time in FW. Fix is to allow roaming on other interfaces only after if association is successful or all possible candidates APs are tried by current interface. Change-Id: I5b765d5a8ffc10ad2903d746537e41501890ca8b CRs-Fixed: 2577368 --- core/hdd/src/wlan_hdd_assoc.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/core/hdd/src/wlan_hdd_assoc.c b/core/hdd/src/wlan_hdd_assoc.c index ba61b679db04..a51c4a592a2a 100644 --- a/core/hdd/src/wlan_hdd_assoc.c +++ b/core/hdd/src/wlan_hdd_assoc.c @@ -2935,13 +2935,6 @@ hdd_association_completion_handler(struct hdd_adapter *adapter, */ hdd_reset_scan_reject_params(hdd_ctx, roam_status, roam_result); - /* - * Enable roaming on other STA iface except this one. - * Firmware dosent support connection on one STA iface while - * roaming on other STA iface - */ - wlan_hdd_enable_roaming(adapter, RSO_CONNECT_START); - /* HDD has initiated disconnect, do not send connect result indication * to kernel as it will be handled by __cfg80211_disconnect. */ @@ -2969,6 +2962,13 @@ hdd_association_completion_handler(struct hdd_adapter *adapter, eConnectionState_Associated); } + /* + * Enable roaming on other STA iface except this one. + * Firmware dosent support connection on one STA iface while + * roaming on other STA iface + */ + wlan_hdd_enable_roaming(adapter, RSO_CONNECT_START); + /* Save the connection info from CSR... */ hdd_conn_save_connect_info(adapter, roam_info, eCSR_BSS_TYPE_INFRASTRUCTURE); @@ -3656,6 +3656,13 @@ hdd_association_completion_handler(struct hdd_adapter *adapter, /* do we need to change the HW mode on final failure */ policy_mgr_check_n_start_opportunistic_timer( hdd_ctx->psoc); + + /* + * Enable roaming on other STA iface except this one. + * Firmware dosent support connection on one STA iface + * while roaming on other STA iface + */ + wlan_hdd_enable_roaming(adapter, RSO_CONNECT_START); } /*