Browse Source

qcacmn: Add fixes in snapshot read logic

1. Initialize the temporary variable to read snapshot to zero.
2. Read correct number of shared snapshot values.

CRs-Fixed: 3026029
Change-Id: I6f4fc9d1d2bfe4818304be16f7c80830b4fb260b
Edayilliam Jayadev 3 năm trước cách đây
mục cha
commit
9fd7fb390c

+ 2 - 0
target_if/mgmt_txrx/src/target_if_mgmt_txrx_rx_reo.c

@@ -181,6 +181,8 @@ target_if_mgmt_rx_reo_read_snapshot(
 		return QDF_STATUS_E_INVAL;
 	}
 
+	qdf_mem_zero(snapshot_value, sizeof(*snapshot_value));
+
 	low_level_ops = target_if_get_mgmt_rx_reo_low_level_ops(
 				wlan_pdev_get_psoc(pdev));
 

+ 4 - 1
umac/cmn_services/mgmt_txrx/core/src/wlan_mgmt_txrx_rx_reo.c

@@ -216,6 +216,9 @@ wlan_mgmt_rx_reo_algo_calculate_wait_count(
 			address = rx_reo_pdev_ctx->
 				   host_target_shared_snapshot[snapshot_id],
 
+			qdf_mem_zero(&snapshot_params[snapshot_id],
+				     sizeof(snapshot_params[snapshot_id]));
+
 			status = tgt_mgmt_rx_reo_read_snapshot(
 						pdev, address, snapshot_id,
 						&snapshot_params[snapshot_id]);
@@ -227,7 +230,7 @@ wlan_mgmt_rx_reo_algo_calculate_wait_count(
 				return status;
 			}
 
-			/* If snpashot is valid, save it in the pdev context */
+			/* If snapshot is valid, save it in the pdev context */
 			if (snapshot_params[snapshot_id].valid) {
 				rx_reo_pdev_ctx->
 				   last_valid_shared_snapshot[snapshot_id] =