]> git.baikalelectronics.ru Git - kernel.git/commit
net: smsc911x: fix skb handling in receive path
authorWill Deacon <will.deacon@arm.com>
Thu, 12 Apr 2012 05:54:09 +0000 (05:54 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 13 Apr 2012 18:07:51 +0000 (14:07 -0400)
commit1d57fc1959947394b96e1dd63372480e64bf026a
treee99ee38a97475131747820deddf3ff749821160c
parentc4e662ab98d1e152d66f6644f810bc7a2b1013a3
net: smsc911x: fix skb handling in receive path

The SMSC911x driver resets the ->head, ->data and ->tail pointers in the
skb on the reset path in order to avoid buffer overflow due to packet
padding performed by the hardware.

This patch fixes the receive path so that the skb pointers are fixed up
after the data has been read from the device, The error path is also
fixed to use number of words consistently and prevent erroneous FIFO
fastforwarding when skipping over bad data.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/smsc/smsc911x.c