qcacmn: Correct system time usage for tx complete dealy check

In the dp_tx_desc_set_ktimestamp() return false case,
tx_desc->timestamp will not be updated, instead,
tx_desc->timestamp_tick used. So it will cause
dp_tx_comp_delay_check() always return false when
timestamp equal zero. Need to move the tx desc
timestamp check to correct place.

Change-Id: Ic1d5f1035784dcc3f240d832ac1e8820bc24f782
CRs-Fixed: 3331251
This commit is contained in:
Chaoli Zhou
2022-11-22 16:16:30 +08:00
committed by Madan Koyyalamudi
parent b0b3b2a793
commit 976fcbba3a

View File

@@ -14221,10 +14221,10 @@ static bool dp_tx_comp_delay_check(struct dp_tx_desc_s *tx_desc)
qdf_ktime_t current_time = qdf_ktime_real_get();
qdf_ktime_t timestamp = tx_desc->timestamp;
if (!timestamp)
return false;
if (dp_tx_pkt_tracepoints_enabled()) {
if (!timestamp)
return false;
time_latency = qdf_ktime_to_ms(current_time) -
qdf_ktime_to_ms(timestamp);
if (time_latency >= DP_TX_COMP_MAX_LATENCY_MS) {
@@ -14233,12 +14233,15 @@ static bool dp_tx_comp_delay_check(struct dp_tx_desc_s *tx_desc)
return true;
}
} else {
if (!timestamp_tick)
return false;
current_time = qdf_system_ticks();
time_latency = qdf_system_ticks_to_msecs(current_time -
timestamp_tick);
if (time_latency >= DP_TX_COMP_MAX_LATENCY_MS) {
dp_err_rl("enqueued: %u ms, current : %u ms",
qdf_system_ticks_to_msecs(timestamp),
qdf_system_ticks_to_msecs(timestamp_tick),
qdf_system_ticks_to_msecs(current_time));
return true;
}