]> git.baikalelectronics.ru Git - kernel.git/commit
ethoc: align received packet to make IP header at word boundary
authorThomas Chou <thomas@wytron.com.tw>
Sun, 4 Oct 2009 23:33:19 +0000 (23:33 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 7 Oct 2009 10:50:12 +0000 (03:50 -0700)
commit96454030b41c19732539c3d5dcd768a586cc44a2
tree93b1b4c4bcd43b70a08e68fd1b9ae313a5fd559e
parentabda821e00db540a1904f29e13413f3e10784d40
ethoc: align received packet to make IP header at word boundary

The packet buffer is allocated at 4 bytes boundary, but the IP header
length and version bits is located at byte 14. These bit fields access
as 32 bits word and caused exception on processors that do not support
unaligned access.

The patch adds 2 bytes offset to make the bit fields word aligned.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethoc.c