[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <0573C9D4B793EF43BF95221F2F4CC851593A72@CHN-SV-EXMX06.mchp-main.com>
Date: Thu, 6 Sep 2018 06:26:08 +0000
From: <RaghuramChary.Jallipalli@...rochip.com>
To: <stefan.wahren@...e.com>, <UNGLinuxDriver@...rochip.com>,
<Woojung.Huh@...rochip.com>
CC: <davem@...emloft.net>, <netdev@...r.kernel.org>
Subject: RE: smsc95xx: Invalid max MTU
> diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c index
> 06b4d29..420a0e4 100644
> --- a/drivers/net/usb/smsc95xx.c
> +++ b/drivers/net/usb/smsc95xx.c
> @@ -1318,6 +1318,7 @@ 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->max_mtu = ETH_DATA_LEN;
> dev->hard_mtu = dev->net->mtu + dev->net->hard_header_len;
>
> pdata->dev = dev;
Thanks for the patch.
Because device max_mtu is checked before changing the MTU value, I think your patch looks good to me.
Maybe you also want to add min_mtu too?
Thanks,
-Raghu
Powered by blists - more mailing lists