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)
commite0b2e0d8e6692ee488387aba871d0b70e1ed400a
treeb2e7ac2478de7087a1e651e09015012c806bc603
parent14b26b127c098bbab9b364d90a007c478090bf5f
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: 5f4a8ef384db ("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