Преглед на файлове

qcacld-3.0: Update SAE status to SME in SAP mode as well

A check has been introduced while implementing SAE roaming to send
the SAE status to SME only when the STA is not in joined state.
But this doesn't handle the SAP case where the status is expected
to be updated always.

Update the status to SME in below cases
1. SAP mode: Always
2. STA mode: When the device is not in joined state

If the device is in joined state, send the status to WMA which
is meant for roaming.

Change-Id: I20c134a3eea7c65db1fe1950c02b8b9e1ee3a34d
CRs-Fixed: 2524973
Srinivas Dasari преди 5 години
родител
ревизия
a7bc4ff953
променени са 1 файла, в които са добавени 18 реда и са изтрити 6 реда
  1. 18 6
      core/sme/src/common/sme_api.c

+ 18 - 6
core/sme/src/common/sme_api.c

@@ -15170,17 +15170,29 @@ QDF_STATUS sme_handle_sae_msg(mac_handle_t mac_handle,
 	struct sir_sae_msg *sae_msg;
 	struct scheduler_msg sch_msg = {0};
 	struct wmi_roam_auth_status_params *params;
-
-	if (!CSR_IS_SESSION_VALID(mac, session_id)) {
-		sme_err("Invalid session id: %d", session_id);
-		return false;
-	}
+	struct csr_roam_session *csr_session;
 
 	qdf_status = sme_acquire_global_lock(&mac->sme);
 	if (QDF_IS_STATUS_ERROR(qdf_status))
 		return qdf_status;
 
-	if (!CSR_IS_ROAM_JOINED(mac, session_id)) {
+	csr_session = CSR_GET_SESSION(mac, session_id);
+	if (!csr_session) {
+		sme_err("session %d not found", session_id);
+		qdf_status = QDF_STATUS_E_FAILURE;
+		goto error;
+	}
+
+	/* Update the status to SME in below cases
+	 * 1. SAP mode: Always
+	 * 2. STA mode: When the device is not in joined state
+	 *
+	 * If the device is in joined state, send the status to WMA which
+	 * is meant for roaming.
+	 */
+	if ((csr_session->pCurRoamProfile &&
+	     csr_session->pCurRoamProfile->csrPersona == QDF_SAP_MODE) ||
+	    !CSR_IS_ROAM_JOINED(mac, session_id)) {
 		sae_msg = qdf_mem_malloc(sizeof(*sae_msg));
 		if (!sae_msg) {
 			qdf_status = QDF_STATUS_E_NOMEM;