diff options
author | 2020-09-18 13:52:34 -0700 | |
---|---|---|
committer | 2020-09-18 13:52:34 -0700 | |
commit | 2b33b202dc3e30a15d7c0147f26fc6bb23f85493 (patch) | |
tree | b0fc2f9e06094d458c05a7017ea47408350fa271 /net/dsa/tag_ocelot.c | |
parent | nfp: use correct define to return NONE fec (diff) | |
parent | net: mscc: ocelot: deinitialize only initialized ports (diff) | |
download | wireguard-linux-2b33b202dc3e30a15d7c0147f26fc6bb23f85493.tar.xz wireguard-linux-2b33b202dc3e30a15d7c0147f26fc6bb23f85493.zip |
Merge branch 'Bugfixes-in-Microsemi-Ocelot-switch-driver'
Vladimir Oltean says:
====================
Bugfixes in Microsemi Ocelot switch driver
This is a series of 8 assorted patches for "net", on the drivers for the
VSC7514 MIPS switch (Ocelot-1), the VSC9953 PowerPC (Seville), and a few
more that are common to all supported devices since they are in the
common library portion.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dsa/tag_ocelot.c')
-rw-r--r-- | net/dsa/tag_ocelot.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/net/dsa/tag_ocelot.c b/net/dsa/tag_ocelot.c index 42f327c06dca..b4fc05cafaa6 100644 --- a/net/dsa/tag_ocelot.c +++ b/net/dsa/tag_ocelot.c @@ -160,11 +160,14 @@ static struct sk_buff *ocelot_xmit(struct sk_buff *skb, packing(injection, &qos_class, 19, 17, OCELOT_TAG_LEN, PACK, 0); if (ocelot->ptp && (skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP)) { + struct sk_buff *clone = DSA_SKB_CB(skb)->clone; + rew_op = ocelot_port->ptp_cmd; - if (ocelot_port->ptp_cmd == IFH_REW_OP_TWO_STEP_PTP) { - rew_op |= (ocelot_port->ts_id % 4) << 3; - ocelot_port->ts_id++; - } + /* Retrieve timestamp ID populated inside skb->cb[0] of the + * clone by ocelot_port_add_txtstamp_skb + */ + if (ocelot_port->ptp_cmd == IFH_REW_OP_TWO_STEP_PTP) + rew_op |= clone->cb[0] << 3; packing(injection, &rew_op, 125, 117, OCELOT_TAG_LEN, PACK, 0); } |