diff options
author | Jussi Kivilinna <jussi.kivilinna@mbnet.fi> | 2010-06-07 03:56:27 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-06-07 03:56:27 -0400 |
commit | 9227a46bfbac0516fb7428715a095e1bc59b872a (patch) | |
tree | 2306b6f10f51a14b815af079b35bcc5eadd003fb /drivers/net/usb | |
parent | 024a07bacf8287a6ddfa83e9d5b951c5e8b4070e (diff) |
asix: check packet size against mtu+ETH_HLEN instead of ETH_FRAME_LEN
Driver checks received packet is too large in asix_rx_fixup() and fails if it is. Problem is
that MTU might be set larger than 1500 and asix fails to work correctly with VLAN tagged
packets. The check should be 'dev->net->mtu + ETH_HLEN' instead.
Tested with AX88772.
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb')
-rw-r--r-- | drivers/net/usb/asix.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/usb/asix.c b/drivers/net/usb/asix.c index 1f802e90474c..9516f382a6ba 100644 --- a/drivers/net/usb/asix.c +++ b/drivers/net/usb/asix.c | |||
@@ -344,7 +344,7 @@ static int asix_rx_fixup(struct usbnet *dev, struct sk_buff *skb) | |||
344 | return 2; | 344 | return 2; |
345 | } | 345 | } |
346 | 346 | ||
347 | if (size > ETH_FRAME_LEN) { | 347 | if (size > dev->net->mtu + ETH_HLEN) { |
348 | netdev_err(dev->net, "asix_rx_fixup() Bad RX Length %d\n", | 348 | netdev_err(dev->net, "asix_rx_fixup() Bad RX Length %d\n", |
349 | size); | 349 | size); |
350 | return 0; | 350 | return 0; |