aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/dlink/sundance.c
diff options
context:
space:
mode:
authorJarod Wilson <jarod@redhat.com>2016-10-17 15:54:11 -0400
committerDavid S. Miller <davem@davemloft.net>2016-10-18 11:34:20 -0400
commitf7ad72bfceb95e6607e0f0d7b7dbfb551865610a (patch)
tree7f931adfb03053bfa4fe95bccc15d322d362700b /drivers/net/ethernet/dlink/sundance.c
parentethernet/sun: use core min/max MTU checking (diff)
downloadlinux-dev-f7ad72bfceb95e6607e0f0d7b7dbfb551865610a.tar.xz
linux-dev-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 '')
-rw-r--r--drivers/net/ethernet/dlink/sundance.c6
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 = &ethtool_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;