diff options
author | Jarod Wilson <jarod@redhat.com> | 2016-10-17 22:54:10 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-10-18 18:34:20 +0300 |
commit | 540bfe30dc3f0b365c3a859eecad66ef468e167c (patch) | |
tree | ef6f1f7e8991d9b390ebeee8cc4e73a30503b82e /drivers/net/ethernet/sun/niu.c | |
parent | c7315a95c2a3c8a5a5e31c72755d7505e92f0872 (diff) | |
download | linux-540bfe30dc3f0b365c3a859eecad66ef468e167c.tar.xz |
ethernet/sun: use core min/max MTU checking
cassini: min_mtu 60, max_mtu 9000
niu: min_mtu 68, max_mtu 9216
sungem: min_mtu 68, max_mtu 1500 (comments say jumbo mode is broken)
sunvnet: min_mtu 68, max_mtu 65535
- removed sunvnet_change_mut_common as it does nothing now
CC: netdev@vger.kernel.org
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/sun/niu.c')
-rw-r--r-- | drivers/net/ethernet/sun/niu.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/ethernet/sun/niu.c b/drivers/net/ethernet/sun/niu.c index a2371aa14a49..f90d1af6d390 100644 --- a/drivers/net/ethernet/sun/niu.c +++ b/drivers/net/ethernet/sun/niu.c @@ -6754,9 +6754,6 @@ static int niu_change_mtu(struct net_device *dev, int new_mtu) struct niu *np = netdev_priv(dev); int err, orig_jumbo, new_jumbo; - if (new_mtu < 68 || new_mtu > NIU_MAX_MTU) - return -EINVAL; - orig_jumbo = (dev->mtu > ETH_DATA_LEN); new_jumbo = (new_mtu > ETH_DATA_LEN); @@ -9823,6 +9820,10 @@ static int niu_pci_init_one(struct pci_dev *pdev, dev->irq = pdev->irq; + /* MTU range: 68 - 9216 */ + dev->min_mtu = ETH_MIN_MTU; + dev->max_mtu = NIU_MAX_MTU; + niu_assign_netdev_ops(dev); err = niu_get_invariants(np); |