From b7fe763018a85e23db194b3e842a4ee1a6509e99 Mon Sep 17 00:00:00 2001 From: Vivek Date: Wed, 11 Jan 2023 10:31:40 +0530 Subject: [PATCH] qcacmn: Check for enqueue timestamp for Tx delay calculation The Tx delay computed is very large if the enqueue timestamp is zero. Compute Tx delay only when the enqueue timestamp is valid. Change-Id: Ic4032a6f4a01fc661dc1155a4543cd7fc4216970 CRs-Fixed: 3354639 --- dp/wifi3.0/dp_tx.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dp/wifi3.0/dp_tx.c b/dp/wifi3.0/dp_tx.c index bb1c85b147..fd019ab18b 100644 --- a/dp/wifi3.0/dp_tx.c +++ b/dp/wifi3.0/dp_tx.c @@ -4594,6 +4594,8 @@ void dp_tx_compute_delay(struct dp_vdev *vdev, struct dp_tx_desc_s *tx_desc, fwhw_transmit_delay = (uint32_t)(current_timestamp - timestamp_hw_enqueue); + if (!timestamp_hw_enqueue) + return; /* * Delay between packet enqueued to HW and Tx completion in ms */