]> git.itanic.dy.fi Git - linux-stable/commitdiff
net: dsa: tag_sja1105: replace skb_mac_header() with vlan_eth_hdr()
authorVladimir Oltean <vladimir.oltean@nxp.com>
Thu, 20 Apr 2023 22:55:59 +0000 (01:55 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sun, 23 Apr 2023 13:16:44 +0000 (14:16 +0100)
This is a cosmetic patch which consolidates the code to use the helper
function offered by if_vlan.h.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dsa/tag_sja1105.c

index a7ca97b7ac9e6b4244a8b3e87c506dc456efd700..a5f3b73da417fceef9a70d7f6c199cb9c0f8cad7 100644 (file)
@@ -516,7 +516,7 @@ static bool sja1110_skb_has_inband_control_extension(const struct sk_buff *skb)
 static void sja1105_vlan_rcv(struct sk_buff *skb, int *source_port,
                             int *switch_id, int *vbid, u16 *vid)
 {
-       struct vlan_ethhdr *hdr = (struct vlan_ethhdr *)skb_mac_header(skb);
+       struct vlan_ethhdr *hdr = vlan_eth_hdr(skb);
        u16 vlan_tci;
 
        if (skb_vlan_tag_present(skb))