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

Commit a45a3a5c authored by Ben Hutchings's avatar Ben Hutchings
Browse files

sfc: Don't clear timestamps in efx_ptp_rx()



A freshly allocated skb starts with timestamps clear.

Signed-off-by: default avatarBen Hutchings <bhutchings@solarflare.com>
parent 9aecda95
Loading
Loading
Loading
Loading
+0 −6
Original line number Original line Diff line number Diff line
@@ -1323,14 +1323,8 @@ static bool efx_ptp_rx(struct efx_channel *channel, struct sk_buff *skb)


	/* Does this packet require timestamping? */
	/* Does this packet require timestamping? */
	if (ntohs(*(__be16 *)&skb->data[PTP_DPORT_OFFSET]) == PTP_EVENT_PORT) {
	if (ntohs(*(__be16 *)&skb->data[PTP_DPORT_OFFSET]) == PTP_EVENT_PORT) {
		struct skb_shared_hwtstamps *timestamps;

		match->state = PTP_PACKET_STATE_UNMATCHED;
		match->state = PTP_PACKET_STATE_UNMATCHED;


		/* Clear all timestamps held: filled in later */
		timestamps = skb_hwtstamps(skb);
		memset(timestamps, 0, sizeof(*timestamps));

		/* We expect the sequence number to be in the same position in
		/* We expect the sequence number to be in the same position in
		 * the packet for PTP V1 and V2
		 * the packet for PTP V1 and V2
		 */
		 */