summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsheenam monga <shebala@codeaurora.org>2020-03-12 16:45:42 +0530
committerPragaspathi Thilagaraj <tpragasp@codeaurora.org>2020-04-06 17:04:31 +0530
commit2b199fa4505b6f5c793fdffa60aab21375bd8a0c (patch)
treec000027683651c3c7c639856af76ad0bd3ea446e
parent3d2b85146ffa5363bd5d89e881feffb0b628c85e (diff)
qcacld-3.0: Supplicant always does 4-way handshake for whitelist SSID
As part of whitelist SSID feature, firmware roams between different SSID's and offloads 4-way HS to supplicant. Suppose initially if DUT connects to SSID1 and then firmware roams to SSID2 then 4-way HS should be offloaded to supplicant. After that if roaming happens to another BSSID of SSID2 then 4-way HS has to happen within firmware. But due to issue in roaming code, 4-way HS is offloaded to supplicant even if roam happens between same SSID. Issue is for ROAM_RSO_STARTED state in csr_roam_switch_to_rso_start API, There is no handling to send RSO update if Roaming is already started. Due to which csr_roam_offload_scan is not invoked. Second issue in roaming code is that RSO is not enabled with the new SSID2 in firmware. RSO is not enabled as after set key complete the state of roaming state was not set to eCSR_NEIGHBOR_ROAM_STATE_INIT. Due to this the SSID in firmware is still SSID1 and when firmware tries to roam again to SSID2 it offloads 4-way HS to supplicant instead of handling within firmware only. Fix is to update the roam state from eCSR_NEIGHBOR_ROAM_STATE_CONNECTED to eCSR_NEIGHBOR_ROAM_STATE_INIT in csr_process_roam_sync_callback and also handle ROAM_RSO_STARTED state with roam_command ROAM_SCAN_OFFLOAD_UPDATE_CFG instead of returing success from csr_roam_switch_to_rso_start API. Now when supplicant does set key after 4-way HS , roaming is enabled via csr_roam_chk_lnk_set_ctx_rsp-> csr_roam_link_up->csr_neighbor_roam_indicate_connect-> csr_neighbor_roam_info_ctx_init->csr_post_roam_state_change. Change-Id: I5b81f2e03fe1c7dee2820370d06f4e4f8017f12c CRs-Fixed: 2587120
-rw-r--r--core/sme/src/csr/csr_api_roam.c4
-rw-r--r--core/sme/src/csr/csr_neighbor_roam.c13
2 files changed, 12 insertions, 5 deletions
diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c
index 06591ecbf724..52560b37b560 100644
--- a/core/sme/src/csr/csr_api_roam.c
+++ b/core/sme/src/csr/csr_api_roam.c
@@ -20175,7 +20175,7 @@ static void csr_add_rssi_reject_ap_list(tpAniSirGlobal mac_ctx,
#define RSO_RESTART_BIT (1<<ROAM_SCAN_OFFLOAD_RESTART)
#define RSO_UPDATE_CFG_BIT (1<<ROAM_SCAN_OFFLOAD_UPDATE_CFG)
#define RSO_ABORT_SCAN_BIT (1<<ROAM_SCAN_OFFLOAD_ABORT_SCAN)
-#define RSO_START_ALLOW_MASK (RSO_STOP_BIT | RSO_UPDATE_CFG_BIT)
+#define RSO_START_ALLOW_MASK (RSO_START_BIT |RSO_STOP_BIT | RSO_UPDATE_CFG_BIT)
#define RSO_STOP_ALLOW_MASK (RSO_UPDATE_CFG_BIT | RSO_RESTART_BIT | \
RSO_STOP_BIT | RSO_START_BIT | RSO_ABORT_SCAN_BIT)
#define RSO_RESTART_ALLOW_MASK (RSO_UPDATE_CFG_BIT | RSO_START_BIT | \
@@ -23087,6 +23087,8 @@ static QDF_STATUS csr_process_roam_sync_callback(tpAniSirGlobal mac_ctx,
eCSR_ROAM_SUBSTATE_NONE,
session_id);
}
+ csr_neighbor_roam_state_transition(mac_ctx,
+ eCSR_NEIGHBOR_ROAM_STATE_INIT, session_id);
}
roam_info->nBeaconLength = 0;
roam_info->nAssocReqLength = roam_synch_data->reassoc_req_length -
diff --git a/core/sme/src/csr/csr_neighbor_roam.c b/core/sme/src/csr/csr_neighbor_roam.c
index 5449d5d98115..4cc5e5abf68b 100644
--- a/core/sme/src/csr/csr_neighbor_roam.c
+++ b/core/sme/src/csr/csr_neighbor_roam.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011-2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2020 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -1049,9 +1049,14 @@ static void csr_neighbor_roam_info_ctx_init(
} else
#endif
{
- csr_roam_offload_scan(pMac, session_id,
- ROAM_SCAN_OFFLOAD_START,
- REASON_CTX_INIT);
+ if (!ngbr_roam_info->b_roam_scan_offload_started)
+ csr_roam_offload_scan(pMac, session_id,
+ ROAM_SCAN_OFFLOAD_START,
+ REASON_CTX_INIT);
+ else
+ csr_roam_offload_scan(pMac, session_id,
+ ROAM_SCAN_OFFLOAD_UPDATE_CFG,
+ REASON_CONNECT);
if (roam_profile &&
roam_profile->supplicant_disabled_roaming) {