Add hardware csum offload support for MAC style 2 chips, which include
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Thu, 16 Oct 2008 12:29:13 +0000 (12:29 +0000)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Thu, 16 Oct 2008 12:29:13 +0000 (12:29 +0000)
commitafdeb9daba9af3b7a1cf7be6b7008348fc3d635a
treed70b54de06b1fe854c4b0b17537ee46871d4e4a3
parent60bde7bce13ca8cf71483503d77a34dba612f227
Add hardware csum offload support for MAC style 2 chips, which include
8102E, 8102EL, 8168C, 8168CP and 8168D.

Obtained-from: RealTek r8101-1.009.00 r8168-8.008.00

Add RE_C_AUTOPAD capability to indicate hardware could correctly pad
short ether frames.  Turn it on for newer version of 8168B (0x38000000
and 0xb8000000) and MAC style 2 chips; manually padding short UDP packets
for newer version 8168B will result in incorrect UDP csum, while manually
padding short ICMP packets for MAC style 2 chips will result in both
incorrect IP header csum and incorrect IP length (o_O)
sys/dev/netif/re/if_re.c
sys/dev/netif/re/if_rereg.h
sys/dev/netif/re/if_revar.h