summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/sun/cassini.c
diff options
context:
space:
mode:
authorJarod Wilson <jarod@redhat.com>2016-10-17 15:54:10 -0400
committerDavid S. Miller <davem@davemloft.net>2016-10-18 11:34:20 -0400
commit540bfe30dc3f0b365c3a859eecad66ef468e167c (patch)
treeef6f1f7e8991d9b390ebeee8cc4e73a30503b82e /drivers/net/ethernet/sun/cassini.c
parentc7315a95c2a3c8a5a5e31c72755d7505e92f0872 (diff)
downloadlwn-540bfe30dc3f0b365c3a859eecad66ef468e167c.tar.gz
lwn-540bfe30dc3f0b365c3a859eecad66ef468e167c.zip
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/cassini.c')
-rw-r--r--drivers/net/ethernet/sun/cassini.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/ethernet/sun/cassini.c b/drivers/net/ethernet/sun/cassini.c
index 062bce9acde6..e9e5ef241c6f 100644
--- a/drivers/net/ethernet/sun/cassini.c
+++ b/drivers/net/ethernet/sun/cassini.c
@@ -3863,9 +3863,6 @@ static int cas_change_mtu(struct net_device *dev, int new_mtu)
{
struct cas *cp = netdev_priv(dev);
- if (new_mtu < CAS_MIN_MTU || new_mtu > CAS_MAX_MTU)
- return -EINVAL;
-
dev->mtu = new_mtu;
if (!netif_running(dev) || !netif_device_present(dev))
return 0;
@@ -5115,6 +5112,10 @@ static int cas_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
if (pci_using_dac)
dev->features |= NETIF_F_HIGHDMA;
+ /* MTU range: 60 - varies or 9000 */
+ dev->min_mtu = CAS_MIN_MTU;
+ dev->max_mtu = CAS_MAX_MTU;
+
if (register_netdev(dev)) {
dev_err(&pdev->dev, "Cannot register net device, aborting\n");
goto err_out_free_consistent;