Deleted Added
full compact
if_fxp.c (208084) if_fxp.c (213844)
1/*-
2 * Copyright (c) 1995, David Greenman
3 * Copyright (c) 2001 Jonathan Lemon <jlemon@freebsd.org>
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 14 unchanged lines hidden (view full) ---

23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE.
27 *
28 */
29
30#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1995, David Greenman
3 * Copyright (c) 2001 Jonathan Lemon <jlemon@freebsd.org>
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 14 unchanged lines hidden (view full) ---

23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE.
27 *
28 */
29
30#include <sys/cdefs.h>
31__FBSDID("$FreeBSD: head/sys/dev/fxp/if_fxp.c 208084 2010-05-14 17:39:28Z yongari $");
31__FBSDID("$FreeBSD: head/sys/dev/fxp/if_fxp.c 213844 2010-10-14 18:31:40Z yongari $");
32
33/*
34 * Intel EtherExpress Pro/100B PCI Fast Ethernet driver
35 */
36
37#ifdef HAVE_KERNEL_OPTION_HEADERS
38#include "opt_device_polling.h"
39#endif

--- 1409 unchanged lines hidden (view full) ---

1449 *m_head = NULL;
1450 return (ENOBUFS);
1451 }
1452
1453 /*
1454 * Since 82550/82551 doesn't modify IP length and pseudo
1455 * checksum in the first frame driver should compute it.
1456 */
32
33/*
34 * Intel EtherExpress Pro/100B PCI Fast Ethernet driver
35 */
36
37#ifdef HAVE_KERNEL_OPTION_HEADERS
38#include "opt_device_polling.h"
39#endif

--- 1409 unchanged lines hidden (view full) ---

1449 *m_head = NULL;
1450 return (ENOBUFS);
1451 }
1452
1453 /*
1454 * Since 82550/82551 doesn't modify IP length and pseudo
1455 * checksum in the first frame driver should compute it.
1456 */
1457 ip = (struct ip *)(mtod(m, char *) + ip_off);
1458 tcp = (struct tcphdr *)(mtod(m, char *) + poff);
1457 ip->ip_sum = 0;
1458 ip->ip_len = htons(m->m_pkthdr.tso_segsz + (ip->ip_hl << 2) +
1459 (tcp->th_off << 2));
1460 tcp->th_sum = in_pseudo(ip->ip_src.s_addr, ip->ip_dst.s_addr,
1461 htons(IPPROTO_TCP + (tcp->th_off << 2) +
1462 m->m_pkthdr.tso_segsz));
1463 /* Compute total TCP payload. */
1464 tcp_payload = m->m_pkthdr.len - ip_off - (ip->ip_hl << 2);

--- 1708 unchanged lines hidden ---
1459 ip->ip_sum = 0;
1460 ip->ip_len = htons(m->m_pkthdr.tso_segsz + (ip->ip_hl << 2) +
1461 (tcp->th_off << 2));
1462 tcp->th_sum = in_pseudo(ip->ip_src.s_addr, ip->ip_dst.s_addr,
1463 htons(IPPROTO_TCP + (tcp->th_off << 2) +
1464 m->m_pkthdr.tso_segsz));
1465 /* Compute total TCP payload. */
1466 tcp_payload = m->m_pkthdr.len - ip_off - (ip->ip_hl << 2);

--- 1708 unchanged lines hidden ---