• Vladimir Oltean's avatar
    net: dsa: tag_8021q: Create helper function for removing VLAN header · d4619336
    Vladimir Oltean authored
    This removes the existing implementation from tag_sja1105, which was
    partially incorrect (it was not changing the MAC header offset, thereby
    leaving it to point 4 bytes earlier than it should have).
    
    This overwrites the VLAN tag by moving the Ethernet source and
    destination MACs 4 bytes to the right. Then skb->data (assumed to be
    pointing immediately after the EtherType) is temporarily pushed to the
    beginning of the new Ethernet header, the new Ethernet header offset and
    length are recorded, then skb->data is moved back to where it was.
    Signed-off-by: default avatarVladimir Oltean <olteanv@gmail.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    d4619336
tag_8021q.c 11.2 KB