net: dsa: felix: support changing the MTU
authorVladimir Oltean <vladimir.oltean@nxp.com>
Fri, 27 Mar 2020 19:55:47 +0000 (21:55 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 27 Mar 2020 23:07:25 +0000 (16:07 -0700)
commit0b912fc93a680ab6105a63c36222923fbe09065e
tree3ae828b214df599a0f3f2b463acbb23c9ebfea45
parentfb77ffc6ec866b41aba5a31b38eacd8829fd2eb0
net: dsa: felix: support changing the MTU

Changing the MTU for this switch means altering the
DEV_GMII:MAC_CFG_STATUS:MAC_MAXLEN_CFG field MAX_LEN, which in turn
limits the size of frames that can be received.

Special accounting needs to be done for the DSA CPU port (NPI port in
hardware terms). The NPI port configuration needs to be held inside the
private ocelot structure, since it is now accessed from multiple places.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/ocelot/felix.c
drivers/net/ethernet/mscc/ocelot.c
include/soc/mscc/ocelot.h