qcacmn: add fields to record transmit timestamp in nbuf cb

Add field 'u.tx.pa_ts.ts_value' to store the driver ingress
timestamp, and field 'u.tx.dev.priv_cb_m.flag_ts_valid' to
indicate whether 'u.tx.pa_ts.ts_value' is available or not.
Both fields must be cleared before fragment mapping, to
avoid overlap with the filed 'u.tx.pa_ts.paddr'.

Change-Id: I645c3c27b0c519417f86e6346f4f018b8d87d701
CRs-Fixed: 3560477
This commit is contained in:
Yu Wang
2023-09-04 19:10:23 -07:00
committed by Rahul Choudhary
vanhempi 5ac8175db3
commit 8aa054e666
2 muutettua tiedostoa jossa 60 lisäystä ja 4 poistoa

Näytä tiedosto

@@ -289,4 +289,31 @@ qdf_nbuf_rx_get_band(qdf_nbuf_t nbuf)
{
return QDF_NBUF_CB_RX_BAND(nbuf);
}
/**
* qdf_nbuf_set_tx_ts() - set tx timestamp of nbuf
* @buf: Network buffer
*
* Return: None
*/
static inline void qdf_nbuf_set_tx_ts(qdf_nbuf_t buf)
{
__qdf_nbuf_set_tx_ts(buf, qdf_ktime_real_get());
}
/**
* qdf_nbuf_get_tx_ts() - get tx timestamp of nbuf
* @buf: Network buffer
* @clear: clear the fields after getting tx timestamp
*
* Return: tx timestamp
*/
static inline qdf_time_t qdf_nbuf_get_tx_ts(qdf_nbuf_t buf, bool clear)
{
qdf_time_t ts = __qdf_nbuf_get_tx_ts(buf);
if (clear)
__qdf_nbuf_clear_tx_ts(buf);
return ts;
}
#endif /* _QDF_NBUF_M_H */