net: stmmac: Fix stmmac_get_rx_hwtstamp()
authorJose Abreu <Jose.Abreu@synopsys.com>
Fri, 20 Oct 2017 13:37:35 +0000 (14:37 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sun, 22 Oct 2017 01:50:40 +0000 (02:50 +0100)
commit98870943a561c64aca22d10820a881aa4fa728e4
treec0cdcc2062738a131026e859324560d777dc2ab1
parent9c8080d068b861a80d430ba0b42d8c9b07366b66
net: stmmac: Fix stmmac_get_rx_hwtstamp()

When using GMAC4 the valid timestamp is from CTX next desc but
we are passing the previous desc to get_rx_timestamp_status()
callback.

Fix this and while at it rework a little bit the function logic.

Signed-off-by: Jose Abreu <joabreu@synopsys.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Joao Pinto <jpinto@synopsys.com>
Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Cc: Alexandre Torgue <alexandre.torgue@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c