net: enetc: fix incorrect TPID when receiving 802.1ad tagged packets
authorVladimir Oltean <vladimir.oltean@nxp.com>
Mon, 1 Mar 2021 11:18:14 +0000 (13:18 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Mar 2021 16:06:14 +0000 (17:06 +0100)
commitd56e3f8d289bdc70378f84efab166ad38022532e
tree3f18ef48e9c1162536c1c486410be42ad14d8133
parentbf9c564716a13dde6a990d3b02c27cd6e39608bf
net: enetc: fix incorrect TPID when receiving 802.1ad tagged packets

commit 827b6fd046516af605e190c872949f22208b5d41 upstream.

When the enetc ports have rx-vlan-offload enabled, they report a TPID of
ETH_P_8021Q regardless of what was actually in the packet. When
rx-vlan-offload is disabled, packets have the proper TPID. Fix this
inconsistency by finishing the TODO left in the code.

Fixes: d4fd0404c1c9 ("enetc: Introduce basic PF and VF ENETC ethernet drivers")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/freescale/enetc/enetc.c
drivers/net/ethernet/freescale/enetc/enetc_hw.h