net: lan966x: Adjust maximum frame size when vlan is enabled/disabled
authorHoratiu Vultur <horatiu.vultur@microchip.com>
Sun, 30 Oct 2022 21:36:35 +0000 (22:36 +0100)
committerJakub Kicinski <kuba@kernel.org>
Wed, 2 Nov 2022 04:18:16 +0000 (21:18 -0700)
commit25f28bb1b4a7717a9df3aa574d210374ebb6bb23
tree212ae1c33b965fc67da78b98645ec03c5df1c30a
parent486c292230166c2d61701d3c984bf9143588ea28
net: lan966x: Adjust maximum frame size when vlan is enabled/disabled

When vlan filtering is enabled/disabled, it is required to adjust the
maximum received frame size that it can received. When vlan filtering is
enabled, it would all to receive extra 4 bytes, that are the vlan tag.
So the maximum frame size would be 1522 with a vlan tag. If vlan
filtering is disabled then the maximum frame size would be 1518
regardless if there is or not a vlan tag.

Fixes: 6d2c186afa5d ("net: lan966x: Add vlan support.")
Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/microchip/lan966x/lan966x_regs.h
drivers/net/ethernet/microchip/lan966x/lan966x_vlan.c