]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit98ec0d0995c0e7db26cc28bae725375d71f55215
treed4167555ed3f2d0c7d86c73a2c6d7adb5e75d2d5
parentca454b18bb2e7d52aff61c2ec46a2ec760679d11
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