diff options
| author | Alan Cox <alc@FreeBSD.org> | 2001-10-22 06:45:42 +0000 |
|---|---|---|
| committer | Alan Cox <alc@FreeBSD.org> | 2001-10-22 06:45:42 +0000 |
| commit | eab754b91d3a03de34a9081e65c8d6717594f443 (patch) | |
| tree | 34589108aa0dc2ef1cfc4ad19f412d9b879f69bb | |
| parent | d75c1b4a907b7ce928d60bc640641144b36f881d (diff) | |
Notes
| -rw-r--r-- | sys/pci/if_xl.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/sys/pci/if_xl.c b/sys/pci/if_xl.c index 82c6cbe14eef..3c0b28d8173e 100644 --- a/sys/pci/if_xl.c +++ b/sys/pci/if_xl.c @@ -155,6 +155,8 @@ static const char rcsid[] = "$FreeBSD$"; #endif +#define XL905B_CSUM_FEATURES (CSUM_IP | CSUM_TCP | CSUM_UDP) + /* * Various supported device vendors/types and their names. */ @@ -1464,7 +1466,8 @@ static int xl_attach(dev) ifp->if_output = ether_output; if (sc->xl_type == XL_TYPE_905B) { ifp->if_start = xl_start_90xB; - ifp->if_capabilities = IFCAP_RXCSUM; + ifp->if_hwassist = XL905B_CSUM_FEATURES; + ifp->if_capabilities = IFCAP_HWCSUM; } else ifp->if_start = xl_start; ifp->if_watchdog = xl_watchdog; @@ -2446,6 +2449,14 @@ static int xl_encap_90xB(sc, c, m_head) c->xl_ptr->xl_frag[frag - 1].xl_len |= XL_LAST_FRAG; c->xl_ptr->xl_status = XL_TXSTAT_RND_DEFEAT; + if (m_head->m_pkthdr.csum_flags) { + if (m_head->m_pkthdr.csum_flags & CSUM_IP) + c->xl_ptr->xl_status |= XL_TXSTAT_IPCKSUM; + if (m_head->m_pkthdr.csum_flags & CSUM_TCP) + c->xl_ptr->xl_status |= XL_TXSTAT_TCPCKSUM; + if (m_head->m_pkthdr.csum_flags & CSUM_UDP) + c->xl_ptr->xl_status |= XL_TXSTAT_UDPCKSUM; + } return(0); } |
