summaryrefslogtreecommitdiffstats
path: root/drivers/s390/net/ctcm_main.c
diff options
context:
space:
mode:
authorJarod Wilson <jarod@redhat.com>2016-10-20 19:55:23 +0200
committerDavid S. Miller <davem@davemloft.net>2016-10-20 20:51:10 +0200
commit46b3ef4cdf6f84c35eeacfd4c19839e0067fcfdd (patch)
tree79eaa557da7a7bbb41f04076fcfa16e379d6d07c /drivers/s390/net/ctcm_main.c
parentnet: use core MTU range checking in misc drivers (diff)
downloadlinux-46b3ef4cdf6f84c35eeacfd4c19839e0067fcfdd.tar.xz
linux-46b3ef4cdf6f84c35eeacfd4c19839e0067fcfdd.zip
s390/net: use net core MTU range checking
ctcm: - min_mtu = 576, max_mtu = 65527 netiucv: - min_mtu = 576, max_mtu = 65535 qeth: - min_mtu = 64, max_mtu = 65535 CC: netdev@vger.kernel.org CC: linux-s390@vger.kernel.org CC: Ursula Braun <ubraun@linux.vnet.ibm.com> Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/s390/net/ctcm_main.c')
-rw-r--r--drivers/s390/net/ctcm_main.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/s390/net/ctcm_main.c b/drivers/s390/net/ctcm_main.c
index ad17fc5883f6..ac65f12bcd43 100644
--- a/drivers/s390/net/ctcm_main.c
+++ b/drivers/s390/net/ctcm_main.c
@@ -1032,9 +1032,6 @@ static int ctcm_change_mtu(struct net_device *dev, int new_mtu)
struct ctcm_priv *priv;
int max_bufsize;
- if (new_mtu < 576 || new_mtu > 65527)
- return -EINVAL;
-
priv = dev->ml_priv;
max_bufsize = priv->channel[CTCM_READ]->max_bufsize;
@@ -1123,6 +1120,8 @@ void static ctcm_dev_setup(struct net_device *dev)
dev->type = ARPHRD_SLIP;
dev->tx_queue_len = 100;
dev->flags = IFF_POINTOPOINT | IFF_NOARP;
+ dev->min_mtu = 576;
+ dev->max_mtu = 65527;
}
/*