net: dsa: stop updating master MTU from master.c
authorVladimir Oltean <vladimir.oltean@nxp.com>
Wed, 5 Jan 2022 23:11:14 +0000 (01:11 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 6 Jan 2022 11:59:09 +0000 (11:59 +0000)
commita1ff94c2973c43bc1e2677ac63ebb15b1d1ff846
treed4167555ed3f2d0c7d86c73a2c6d7adb5e75d2d5
parente31dbd3b6aba585231cd84a87adeb22e7c6a8c19
net: dsa: stop updating master MTU from master.c

At present there are two paths for changing the MTU of the DSA master.

The first is:

dsa_tree_setup
-> dsa_tree_setup_ports
   -> dsa_port_setup
      -> dsa_slave_create
         -> dsa_slave_change_mtu
            -> dev_set_mtu(master)

The second is:

dsa_tree_setup
-> dsa_tree_setup_master
   -> dsa_master_setup
      -> dev_set_mtu(dev)

So the dev_set_mtu() call from dsa_master_setup() has been effectively
superseded by the dsa_slave_change_mtu(slave_dev, ETH_DATA_LEN) that is
done from dsa_slave_create() for each user port. The later function also
updates the master MTU according to the largest user port MTU from the
tree. Therefore, updating the master MTU through a separate code path
isn't needed.

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>
net/dsa/master.c