Skip to content

Commit 48afaba

Browse files
vladimirolteankuba-moo
authored andcommitted
net: dsa: tag_qca: use the dsa_xmit_port_mask() helper
The "qca" 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-10-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 5733fe2 commit 48afaba

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

net/dsa/tag_qca.c

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

1515
static struct sk_buff *qca_tag_xmit(struct sk_buff *skb, struct net_device *dev)
1616
{
17-
struct dsa_port *dp = dsa_user_to_port(dev);
1817
__be16 *phdr;
1918
u16 hdr;
2019

@@ -26,7 +25,7 @@ static struct sk_buff *qca_tag_xmit(struct sk_buff *skb, struct net_device *dev)
2625
/* Set the version field, and set destination port information */
2726
hdr = FIELD_PREP(QCA_HDR_XMIT_VERSION, QCA_HDR_VERSION);
2827
hdr |= QCA_HDR_XMIT_FROM_CPU;
29-
hdr |= FIELD_PREP(QCA_HDR_XMIT_DP_BIT, BIT(dp->index));
28+
hdr |= FIELD_PREP(QCA_HDR_XMIT_DP_BIT, dsa_xmit_port_mask(skb, dev));
3029

3130
*phdr = htons(hdr);
3231

0 commit comments

Comments
 (0)