mirror of https://github.com/torvalds/linux.git
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>
This commit is contained in:
parent
e094428fb4
commit
f59e44cc0d
|
|
@ -20,7 +20,6 @@
|
||||||
static struct sk_buff *hellcreek_xmit(struct sk_buff *skb,
|
static struct sk_buff *hellcreek_xmit(struct sk_buff *skb,
|
||||||
struct net_device *dev)
|
struct net_device *dev)
|
||||||
{
|
{
|
||||||
struct dsa_port *dp = dsa_user_to_port(dev);
|
|
||||||
u8 *tag;
|
u8 *tag;
|
||||||
|
|
||||||
/* Calculate checksums (if required) before adding the trailer tag to
|
/* Calculate checksums (if required) before adding the trailer tag to
|
||||||
|
|
@ -33,7 +32,7 @@ static struct sk_buff *hellcreek_xmit(struct sk_buff *skb,
|
||||||
|
|
||||||
/* Tag encoding */
|
/* Tag encoding */
|
||||||
tag = skb_put(skb, HELLCREEK_TAG_LEN);
|
tag = skb_put(skb, HELLCREEK_TAG_LEN);
|
||||||
*tag = BIT(dp->index);
|
*tag = dsa_xmit_port_mask(skb, dev);
|
||||||
|
|
||||||
return skb;
|
return skb;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue