]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: rtl8366rb: Roof MTU for switch
authorLinus Walleij <linus.walleij@linaro.org>
Thu, 8 Oct 2020 21:03:40 +0000 (23:03 +0200)
committerJakub Kicinski <kuba@kernel.org>
Sat, 10 Oct 2020 18:25:05 +0000 (11:25 -0700)
commit6a6485a261d7a4f1095e8911012424cb8e8fa6dd
treeb2e7ac2478de7087a1e651e09015012c806bc603
parent61e64e607272e278059423a4a948c393c14a1499
net: dsa: rtl8366rb: Roof MTU for switch

The MTU setting for this DSA switch is global so we need
to keep track of the MTU set for each port, then as soon
as any MTU changes, roof the MTU to the biggest common
denominator and poke that into the switch MTU setting.

To achieve this we need a per-chip-variant state container
for the RTL8366RB to use for the RTL8366RB-specific
stuff. Other SMI switches does seem to have per-port
MTU setting capabilities.

Fixes: 22bd4939a2d7 ("net: dsa: rtl8366rb: Support setting MTU")
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/dsa/realtek-smi-core.c
drivers/net/dsa/realtek-smi-core.h
drivers/net/dsa/rtl8366rb.c