Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d7be81a5 authored by Lino Sanfilippo's avatar Lino Sanfilippo Committed by David S. Miller
Browse files

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: default avatarLino Sanfilippo <LinoSanfilippo@gmx.de>
Acked-by: default avatarSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 79c13423
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;