summaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorLino Sanfilippo <LinoSanfilippo@gmx.de>2016-03-27 12:22:02 +0200
committerDavid S. Miller <davem@davemloft.net>2016-03-27 22:41:37 -0400
commitd7be81a5916bdb1d904803958e5991a16f7ae4b2 (patch)
treedc5dc7811f37e04cf4762b0a6c53ecd705cf7f6e /drivers/net
parent79c134239df989167acd277364b83ff9e91e70c4 (diff)
downloadlinux-stable-d7be81a5916bdb1d904803958e5991a16f7ae4b2.tar.gz
linux-stable-d7be81a5916bdb1d904803958e5991a16f7ae4b2.tar.bz2
linux-stable-d7be81a5916bdb1d904803958e5991a16f7ae4b2.zip
ravb: fix software timestamping
In ravb_start_xmit dont call skb_tx_timestamp only when hardware timestamping is requested: in the latter case software timestamps are suppressed and thus the call of skb_tx_timestamp does not have any effect. Instead call skb_tx_timestamp unconditionally in ravb_start_xmit, since the function checks itself if software timestamping is required or should be skipped due to hardware timestamping. Signed-off-by: Lino Sanfilippo <LinoSanfilippo@gmx.de> Acked-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/ethernet/renesas/ravb_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c
index 4e1a7dba7c4a..087e14a3fba7 100644
--- a/drivers/net/ethernet/renesas/ravb_main.c
+++ b/drivers/net/ethernet/renesas/ravb_main.c
@@ -1377,11 +1377,11 @@ static netdev_tx_t ravb_start_xmit(struct sk_buff *skb, struct net_device *ndev)
/* TAG and timestamp required flag */
skb_shinfo(skb)->tx_flags |= SKBTX_IN_PROGRESS;
- skb_tx_timestamp(skb);
desc->tagh_tsr = (ts_skb->tag >> 4) | TX_TSR;
desc->ds_tagl |= le16_to_cpu(ts_skb->tag << 12);
}
+ skb_tx_timestamp(skb);
/* Descriptor type must be set after all the above writes */
dma_wmb();
desc->die_dt = DT_FEND;