Skip to content

Commit 3c1975b

Browse files
vladimirolteankuba-moo
authored andcommitted
net: dsa: tag_trailer: use the dsa_xmit_port_mask() helper
The "trailer" tagging protocol populates a bit mask for the TX ports, so we can use dsa_xmit_port_mask() to centralize the decision of how to set that field. Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Link: https://patch.msgid.link/20251127120902.292555-14-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent b33aa90 commit 3c1975b

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

net/dsa/tag_trailer.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,11 @@
1414

1515
static struct sk_buff *trailer_xmit(struct sk_buff *skb, struct net_device *dev)
1616
{
17-
struct dsa_port *dp = dsa_user_to_port(dev);
1817
u8 *trailer;
1918

2019
trailer = skb_put(skb, 4);
2120
trailer[0] = 0x80;
22-
trailer[1] = 1 << dp->index;
21+
trailer[1] = dsa_xmit_port_mask(skb, dev);
2322
trailer[2] = 0x10;
2423
trailer[3] = 0x00;
2524

0 commit comments

Comments
 (0)