net: dsa: use the ETH_MIN_MTU and ETH_DATA_LEN default values
authorVladimir Oltean <olteanv@gmail.com>
Sat, 18 Jul 2020 18:04:18 +0000 (21:04 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 21 Jul 2020 01:35:04 +0000 (18:35 -0700)
commit71d4364abdc50cb1f0ff5af0f932b110278f620c
treea0468e90aa5baeed0b11a6e4132c65839b422f05
parentf58d2598cf70d41f73e761b62a114d2e8f94a676
net: dsa: use the ETH_MIN_MTU and ETH_DATA_LEN default values

Now that DSA supports MTU configuration, undo the effects of commit
8b1efc0f83f1 ("net: remove MTU limits on a few ether_setup callers") and
let DSA interfaces use the default min_mtu and max_mtu specified by
ether_setup(). This is more important for min_mtu: since DSA is
Ethernet, the minimum MTU is the same as of any other Ethernet
interface, and definitely not zero. For the max_mtu, we have a callback
through which drivers can override that, if they want to.

Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dsa/slave.c