Skip to content

Commit f186a82

Browse files
atorguedavem330
authored andcommitted
net: stmmac: use correct define to get rx timestamp on GMAC4
In dwmac4_wrback_get_rx_timestamp_status we looking for a RX timestamp. For that receive descriptors are handled and so we should use defines related to receive descriptors. It'll no change the functional behavior as RDES3_RDES1_VALID=TDES3_RS1V=BIT(26) but it makes code easier to read. Signed-off-by: Alexandre Torgue <alexandre.torgue@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent d0edde8 commit f186a82

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ static int dwmac4_wrback_get_rx_timestamp_status(void *desc, void *next_desc,
268268
int ret = -EINVAL;
269269

270270
/* Get the status from normal w/b descriptor */
271-
if (likely(p->des3 & TDES3_RS1V)) {
271+
if (likely(le32_to_cpu(p->des3) & RDES3_RDES1_VALID)) {
272272
if (likely(le32_to_cpu(p->des1) & RDES1_TIMESTAMP_AVAILABLE)) {
273273
int i = 0;
274274

0 commit comments

Comments
 (0)