diff options
author | Jarod Wilson <jarod@redhat.com> | 2016-10-20 19:55:19 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-10-20 20:51:09 +0200 |
commit | 8b6b4135e4fb2b537f33b811c13f77bee25ca8d3 (patch) | |
tree | 7dc0a6266b83daab36cbf664bd441d92af5a599f /drivers/net/wan/x25_asy.c | |
parent | net: use core MTU range checking in wireless drivers (diff) | |
download | linux-8b6b4135e4fb2b537f33b811c13f77bee25ca8d3.tar.xz linux-8b6b4135e4fb2b537f33b811c13f77bee25ca8d3.zip |
net: use core MTU range checking in WAN drivers
- set min/max_mtu in all hdlc drivers, remove hdlc_change_mtu
- sent max_mtu in lec driver, remove lec_change_mtu
- set min/max_mtu in x25_asy driver
CC: netdev@vger.kernel.org
CC: Krzysztof Halasa <khc@pm.waw.pl>
CC: Krzysztof Halasa <khalasa@piap.pl>
CC: Jan "Yenya" Kasprzak <kas@fi.muni.cz>
CC: Francois Romieu <romieu@fr.zoreil.com>
CC: Kevin Curtis <kevin.curtis@farsite.co.uk>
CC: Zhao Qiang <qiang.zhao@nxp.com>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wan/x25_asy.c')
-rw-r--r-- | drivers/net/wan/x25_asy.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/wan/x25_asy.c b/drivers/net/wan/x25_asy.c index 1bc5e93d2a34..878b05d06fc7 100644 --- a/drivers/net/wan/x25_asy.c +++ b/drivers/net/wan/x25_asy.c @@ -124,9 +124,6 @@ static int x25_asy_change_mtu(struct net_device *dev, int newmtu) unsigned char *xbuff, *rbuff; int len; - if (newmtu > 65534) - return -EINVAL; - len = 2 * newmtu; xbuff = kmalloc(len + 4, GFP_ATOMIC); rbuff = kmalloc(len + 4, GFP_ATOMIC); @@ -751,6 +748,8 @@ static void x25_asy_setup(struct net_device *dev) */ dev->mtu = SL_MTU; + dev->min_mtu = 0; + dev->max_mtu = 65534; dev->netdev_ops = &x25_asy_netdev_ops; dev->watchdog_timeo = HZ*20; dev->hard_header_len = 0; |