Skip to content

Commit b5653b1

Browse files
vladimirolteandavem330
authored andcommitted
net: dsa: tag_sja1105: replace skb_mac_header() with vlan_eth_hdr()
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>
1 parent f9346f0 commit b5653b1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

net/dsa/tag_sja1105.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ static bool sja1110_skb_has_inband_control_extension(const struct sk_buff *skb)
516516
static void sja1105_vlan_rcv(struct sk_buff *skb, int *source_port,
517517
int *switch_id, int *vbid, u16 *vid)
518518
{
519-
struct vlan_ethhdr *hdr = (struct vlan_ethhdr *)skb_mac_header(skb);
519+
struct vlan_ethhdr *hdr = vlan_eth_hdr(skb);
520520
u16 vlan_tci;
521521

522522
if (skb_vlan_tag_present(skb))

0 commit comments

Comments
 (0)