Parcourir la source

qcacld-3.0: Disallow roam cfg if Roam not started

The driver always allow roaming command ROAM_SCAN_OFFLOAD_UPDATE_CFG
even through session roaming not "started" in CSR.
But WMA will always enable Roam_scan_mode to non-zero
to FW when handle the command ROAM_SCAN_OFFLOAD_UPDATE_CFG.
The inconsistency is the CSR still keep as roaming stopped
status but WMA enable the roaming on session.

In STA+STA case, there will cause two vdev roam mode enabled in Firmware
because the CSR roaming start state does not keep sync with FW.

Fix by enable FW roam only based on enable state from CSR
when handle the ROAM_SCAN_OFFLOAD_UPDATE_CFG in WMA.

Change-Id: I95a2bd1edd88cc241ae9821a6e0756c44663229a
CRs-Fixed: 2305594
Liangwei Dong il y a 6 ans
Parent
commit
d108cf20d6
2 fichiers modifiés avec 20 ajouts et 13 suppressions
  1. 3 0
      core/sme/src/csr/csr_api_roam.c
  2. 17 13
      core/wma/src/wma_scan_roam.c

+ 3 - 0
core/sme/src/csr/csr_api_roam.c

@@ -18795,6 +18795,9 @@ csr_create_roam_scan_offload_request(tpAniSirGlobal mac_ctx,
 		else
 			csr_roam_reset_roam_params(mac_ctx);
 		req_buf->RoamScanOffloadEnabled = 0;
+	} else if (command == ROAM_SCAN_OFFLOAD_UPDATE_CFG) {
+		req_buf->RoamScanOffloadEnabled =
+			roam_info->b_roam_scan_offload_started;
 	} else {
 		req_buf->RoamScanOffloadEnabled =
 			mac_ctx->roam.configParam.isRoamOffloadScanEnabled;

+ 17 - 13
core/wma/src/wma_scan_roam.c

@@ -1432,8 +1432,9 @@ QDF_STATUS wma_process_roaming_config(tp_wma_handle wma_handle,
 		qdf_mem_free(roam_req);
 		return QDF_STATUS_E_PERM;
 	}
-	WMA_LOGD("%s: RSO Command:%d, reason:%d session ID %d", __func__,
-		 roam_req->Command, roam_req->reason, roam_req->sessionId);
+	WMA_LOGD("%s: RSO Command:%d, reason:%d session ID %d en %d", __func__,
+		 roam_req->Command, roam_req->reason, roam_req->sessionId,
+		 roam_req->RoamScanOffloadEnabled);
 	wma_handle->interfaces[roam_req->sessionId].roaming_in_progress = false;
 	switch (roam_req->Command) {
 	case ROAM_SCAN_OFFLOAD_START:
@@ -1713,18 +1714,18 @@ QDF_STATUS wma_process_roaming_config(tp_wma_handle wma_handle,
 
 	case ROAM_SCAN_OFFLOAD_UPDATE_CFG:
 		wma_handle->suitable_ap_hb_failure = false;
-		wma_roam_scan_fill_scan_params(wma_handle, pMac, roam_req,
-					       &scan_params);
-		qdf_status =
-			wma_roam_scan_offload_mode(wma_handle, &scan_params,
-						   roam_req,
-						   WMI_ROAM_SCAN_MODE_NONE,
-						   roam_req->sessionId);
-		if (qdf_status != QDF_STATUS_SUCCESS)
-			break;
 
-		if (roam_req->RoamScanOffloadEnabled == false)
-			break;
+		if (roam_req->RoamScanOffloadEnabled) {
+			wma_roam_scan_fill_scan_params(wma_handle, pMac,
+						       roam_req, &scan_params);
+			qdf_status =
+				wma_roam_scan_offload_mode(
+					wma_handle, &scan_params, roam_req,
+					WMI_ROAM_SCAN_MODE_NONE,
+					roam_req->sessionId);
+			if (qdf_status != QDF_STATUS_SUCCESS)
+				break;
+		}
 
 		qdf_status = wma_roam_scan_bmiss_cnt(wma_handle,
 					     roam_req->RoamBmissFirstBcnt,
@@ -1797,6 +1798,9 @@ QDF_STATUS wma_process_roaming_config(tp_wma_handle wma_handle,
 		if (qdf_status != QDF_STATUS_SUCCESS)
 			break;
 
+		if (!roam_req->RoamScanOffloadEnabled)
+			break;
+
 		wma_roam_scan_fill_scan_params(wma_handle, pMac, roam_req,
 					       &scan_params);
 		qdf_status =