]> git.baikalelectronics.ru Git - kernel.git/commit
net: lan966x: Fix the MTU calculation
authorHoratiu Vultur <horatiu.vultur@microchip.com>
Sun, 30 Oct 2022 21:36:34 +0000 (22:36 +0100)
committerJakub Kicinski <kuba@kernel.org>
Wed, 2 Nov 2022 04:18:16 +0000 (21:18 -0700)
commit48db9362e6ad175a66e0fc02298e9538c5ce2074
tree9e929dcce1865a48100731e2ca1f28e6fbcd5b8a
parentbe8dd05662999574d4285c3ae841e9b00aacd57e
net: lan966x: Fix the MTU calculation

When the MTU was changed, the lan966x didn't take in consideration
the L2 header and the FCS. So the HW was configured with a smaller
value than what was desired. Therefore the correct value to configure
the HW would be new_mtu + ETH_HLEN + ETH_FCS_LEN.
The vlan tag is not considered here, because at the time when the
blamed commit was added, there was no vlan filtering support. The
vlan fix will be part of the next patch.

Fixes: bb48b7a2878d ("net: lan966x: add port module support")
Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/microchip/lan966x/lan966x_main.c
drivers/net/ethernet/microchip/lan966x/lan966x_main.h