]> git.baikalelectronics.ru Git - kernel.git/commit
dsa: mv88e6xxx: Fix MTU definition
authorAndrew Lunn <andrew@lunn.ch>
Sun, 26 Sep 2021 17:41:25 +0000 (19:41 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 27 Sep 2021 12:31:10 +0000 (13:31 +0100)
commit6c87e8d3c06c43eca8904b526d560e8e35d05f80
treecf79ad7996494b09fc233f512b6b4db79310d7e7
parent520bffa1e7133bc1c7fb165ecf1762c6cc26cebb
dsa: mv88e6xxx: Fix MTU definition

The MTU passed to the DSA driver is the payload size, typically 1500.
However, the switch uses the frame size when applying restrictions.
Adjust the MTU with the size of the Ethernet header and the frame
checksum. The VLAN header also needs to be included when the frame
size it per port, but not when it is global.

Fixes: bf90e25f24c4 ("net: dsa: mv88e6xxx: Use chip-wide max frame size for MTU")
Reported by: 曹煜 <cao88yu@gmail.com>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/mv88e6xxx/chip.c
drivers/net/dsa/mv88e6xxx/global1.c
drivers/net/dsa/mv88e6xxx/port.c