Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: dsa: tag_hellcreek: use the dsa_xmit_port_mask() helper

The "hellcreek" 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.

Cc: Kurt Kanzenbach <kurt@linutronix.de>
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Link: https://patch.msgid.link/20251127120902.292555-5-vladimir.oltean@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Vladimir Oltean and committed by
Jakub Kicinski
f59e44cc e094428f

+1 -2
+1 -2
net/dsa/tag_hellcreek.c
··· 20 20 static struct sk_buff *hellcreek_xmit(struct sk_buff *skb, 21 21 struct net_device *dev) 22 22 { 23 - struct dsa_port *dp = dsa_user_to_port(dev); 24 23 u8 *tag; 25 24 26 25 /* Calculate checksums (if required) before adding the trailer tag to ··· 32 33 33 34 /* Tag encoding */ 34 35 tag = skb_put(skb, HELLCREEK_TAG_LEN); 35 - *tag = BIT(dp->index); 36 + *tag = dsa_xmit_port_mask(skb, dev); 36 37 37 38 return skb; 38 39 }