diff options
author | Jarod Wilson <jarod@redhat.com> | 2016-10-17 15:54:11 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-10-18 11:34:20 -0400 |
commit | f7ad72bfceb95e6607e0f0d7b7dbfb551865610a (patch) | |
tree | 7f931adfb03053bfa4fe95bccc15d322d362700b /drivers/net/ethernet/dlink/sundance.c | |
parent | 540bfe30dc3f0b365c3a859eecad66ef468e167c (diff) | |
download | linux-stable-f7ad72bfceb95e6607e0f0d7b7dbfb551865610a.tar.gz linux-stable-f7ad72bfceb95e6607e0f0d7b7dbfb551865610a.tar.bz2 linux-stable-f7ad72bfceb95e6607e0f0d7b7dbfb551865610a.zip |
ethernet/dlink: use core min/max MTU checking
dl2k: min_mtu 68, max_mtu 1536 or 8000, depending on hardware
- Removed change_mtu, does nothing productive anymore
sundance: min_mtu 68, max_mtu 8191
CC: netdev@vger.kernel.org
CC: Denis Kirjanov <kda@linux-powerpc.org>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/dlink/sundance.c')
-rw-r--r-- | drivers/net/ethernet/dlink/sundance.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/ethernet/dlink/sundance.c b/drivers/net/ethernet/dlink/sundance.c index 79d80090eac8..eab36acfc0d1 100644 --- a/drivers/net/ethernet/dlink/sundance.c +++ b/drivers/net/ethernet/dlink/sundance.c @@ -580,6 +580,10 @@ static int sundance_probe1(struct pci_dev *pdev, dev->ethtool_ops = ðtool_ops; dev->watchdog_timeo = TX_TIMEOUT; + /* MTU range: 68 - 8191 */ + dev->min_mtu = ETH_MIN_MTU; + dev->max_mtu = 8191; + pci_set_drvdata(pdev, dev); i = register_netdev(dev); @@ -713,8 +717,6 @@ err_out_netdev: static int change_mtu(struct net_device *dev, int new_mtu) { - if ((new_mtu < 68) || (new_mtu > 8191)) /* Set by RxDMAFrameLen */ - return -EINVAL; if (netif_running(dev)) return -EBUSY; dev->mtu = new_mtu; |