diff options
author | Stefan Wahren <stefan.wahren@i2se.com> | 2018-11-08 22:38:26 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-11-23 10:19:27 +0300 |
commit | 61c6bb13506f0bc14b0e511167a248ba703f4b0d (patch) | |
tree | 0eca3e3b1c25fd86ec1fe2a8ed6d67990c80ea68 | |
parent | 1ada2e1b289f719ea2e6b0dc5331f6c40b0341a7 (diff) | |
download | linux-61c6bb13506f0bc14b0e511167a248ba703f4b0d.tar.xz |
net: smsc95xx: Fix MTU range
[ Upstream commit 85b18b0237ce9986a81a1b9534b5e2ee116f5504 ]
The commit f77f0aee4da4 ("net: use core MTU range checking in USB NIC
drivers") introduce a common MTU handling for usbnet. But it's missing
the necessary changes for smsc95xx. So set the MTU range accordingly.
This patch has been tested on a Raspberry Pi 3.
Fixes: f77f0aee4da4 ("net: use core MTU range checking in USB NIC drivers")
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/net/usb/smsc95xx.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c index 99e684e39d35..f74739664f89 100644 --- a/drivers/net/usb/smsc95xx.c +++ b/drivers/net/usb/smsc95xx.c @@ -1321,6 +1321,8 @@ static int smsc95xx_bind(struct usbnet *dev, struct usb_interface *intf) dev->net->ethtool_ops = &smsc95xx_ethtool_ops; dev->net->flags |= IFF_MULTICAST; dev->net->hard_header_len += SMSC95XX_TX_OVERHEAD_CSUM; + dev->net->min_mtu = ETH_MIN_MTU; + dev->net->max_mtu = ETH_DATA_LEN; dev->hard_mtu = dev->net->mtu + dev->net->hard_header_len; pdata->dev = dev; |