]> git.baikalelectronics.ru Git - kernel.git/commit
[SC92031] Using padto turned driver into an IPv6-only interface
authorGerrit Renker <gerrit@erg.abdn.ac.uk>
Sat, 17 May 2008 07:35:36 +0000 (08:35 +0100)
committerJeff Garzik <jgarzik@redhat.com>
Thu, 22 May 2008 10:19:18 +0000 (06:19 -0400)
commita088b778f5147d57e65110340a7fa11f9d9e1775
tree972c08baf56fbd8abfcf5d5854567e846b322e80
parent623107c7535cb396e8f63db94022c6993257a6f2
[SC92031] Using padto turned driver into an IPv6-only interface

IPv4 would work with this driver only with static arp table entries,
the patch  reverts a padto introduced in

 commit a9e9d1460c97d4c6e90c21c6231cad0d9f83a81e
 sc92031: start transmit return value bugfix

The padto does not work because the driver code evaluates `len' later on and
there are cases where skb->len is not updated accordingly.

This was observed with ARP frames (skb->len = 42 bytes, !skb_cloned(),
skb_tailroom = 84 bytes). Then in skb_pad(), the first condition is true, where
skb->len is not updated. As a consequence, the driver uses 42 bytes instead of
the 60 bytes, and the ARP frame never makes it onto the wire.

Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
drivers/net/sc92031.c