diff options
author | Alexandre Torgue <alexandre.torgue@st.com> | 2019-02-14 17:03:44 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-02-17 03:13:58 +0100 |
commit | f186a82b10dc229f9cd1e9f27f90cb0ce86e879d (patch) | |
tree | 215778932d2db2f262f997007a84ea1eff53d1e1 /drivers/net/ethernet/stmicro | |
parent | atm: clean up vcc_seq_next() (diff) | |
download | linux-f186a82b10dc229f9cd1e9f27f90cb0ce86e879d.tar.xz linux-f186a82b10dc229f9cd1e9f27f90cb0ce86e879d.zip |
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>
Diffstat (limited to 'drivers/net/ethernet/stmicro')
-rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c b/drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c index 20299f6f65fc..90045fffd393 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c @@ -268,7 +268,7 @@ static int dwmac4_wrback_get_rx_timestamp_status(void *desc, void *next_desc, int ret = -EINVAL; /* Get the status from normal w/b descriptor */ - if (likely(p->des3 & TDES3_RS1V)) { + if (likely(le32_to_cpu(p->des3) & RDES3_RDES1_VALID)) { if (likely(le32_to_cpu(p->des1) & RDES1_TIMESTAMP_AVAILABLE)) { int i = 0; |