summaryrefslogtreecommitdiff
path: root/net/dsa/tag_qca.c
diff options
context:
space:
mode:
authorVladimir Oltean <vladimir.oltean@nxp.com>2021-08-10 16:13:56 +0300
committerDavid S. Miller <davem@davemloft.net>2021-08-11 14:44:58 +0100
commita72808b65834e99534f6c5c7134c201c72fe92aa (patch)
tree86986d9a367b3af440a2567c6294769ffd49eeb0 /net/dsa/tag_qca.c
parent5d928ff4865641309e39e9ec8eec1022f8a0c0ac (diff)
net: dsa: create a helper for locating EtherType DSA headers on TX
Create a similar helper for locating the offset to the DSA header relative to skb->data, and make the existing EtherType header taggers to use it. Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dsa/tag_qca.c')
-rw-r--r--net/dsa/tag_qca.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/dsa/tag_qca.c b/net/dsa/tag_qca.c
index 79a81569d7ec..1ea9401b8ace 100644
--- a/net/dsa/tag_qca.c
+++ b/net/dsa/tag_qca.c
@@ -37,7 +37,7 @@ static struct sk_buff *qca_tag_xmit(struct sk_buff *skb, struct net_device *dev)
skb_push(skb, QCA_HDR_LEN);
dsa_alloc_etype_header(skb, QCA_HDR_LEN);
- phdr = (__be16 *)(skb->data + 2 * ETH_ALEN);
+ phdr = dsa_etype_header_pos_tx(skb);
/* Set the version field, and set destination port information */
hdr = QCA_HDR_VERSION << QCA_HDR_XMIT_VERSION_S |