OSDN Git Service

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)
committerDavid S. Miller <davem@davemloft.net>
Mon, 1 Mar 2021 21:34:47 +0000 (13:34 -0800)
commit827b6fd046516af605e190c872949f22208b5d41
treefa8c965a7cf3f50dc08be3b597c6bd43e6fce32d
parent6d36ecdbc4410e61a0e02adc5d3abeee22a8ffd3
net: enetc: fix incorrect TPID when receiving 802.1ad tagged packets

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>
drivers/net/ethernet/freescale/enetc/enetc.c
drivers/net/ethernet/freescale/enetc/enetc_hw.h