Deleted Added
full compact
if_alc.c (213842) if_alc.c (213844)
1/*-
2 * Copyright (c) 2009, Pyun YongHyeon <yongari@FreeBSD.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 */
27
28/* Driver for Atheros AR813x/AR815x PCIe Ethernet. */
29
30#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2009, Pyun YongHyeon <yongari@FreeBSD.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 */
27
28/* Driver for Atheros AR813x/AR815x PCIe Ethernet. */
29
30#include <sys/cdefs.h>
31__FBSDID("$FreeBSD: head/sys/dev/alc/if_alc.c 213842 2010-10-14 17:57:52Z yongari $");
31__FBSDID("$FreeBSD: head/sys/dev/alc/if_alc.c 213844 2010-10-14 18:31:40Z yongari $");
32
33#include <sys/param.h>
34#include <sys/systm.h>
35#include <sys/bus.h>
36#include <sys/endian.h>
37#include <sys/kernel.h>
38#include <sys/lock.h>
39#include <sys/malloc.h>

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

2099 * checksum that NDIS refers to does not include
2100 * TCP payload length so driver should recompute
2101 * the pseudo checksum here. Hopefully this
2102 * wouldn't be much burden on modern CPUs.
2103 *
2104 * Reset IP checksum and recompute TCP pseudo
2105 * checksum as NDIS specification said.
2106 */
32
33#include <sys/param.h>
34#include <sys/systm.h>
35#include <sys/bus.h>
36#include <sys/endian.h>
37#include <sys/kernel.h>
38#include <sys/lock.h>
39#include <sys/malloc.h>

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

2099 * checksum that NDIS refers to does not include
2100 * TCP payload length so driver should recompute
2101 * the pseudo checksum here. Hopefully this
2102 * wouldn't be much burden on modern CPUs.
2103 *
2104 * Reset IP checksum and recompute TCP pseudo
2105 * checksum as NDIS specification said.
2106 */
2107 ip = (struct ip *)(mtod(m, char *) + ip_off);
2108 tcp = (struct tcphdr *)(mtod(m, char *) + poff);
2107 ip->ip_sum = 0;
2108 tcp->th_sum = in_pseudo(ip->ip_src.s_addr,
2109 ip->ip_dst.s_addr, htons(IPPROTO_TCP));
2110 }
2111 *m_head = m;
2112 }
2113
2114 prod = sc->alc_cdata.alc_tx_prod;

--- 1656 unchanged lines hidden ---
2109 ip->ip_sum = 0;
2110 tcp->th_sum = in_pseudo(ip->ip_src.s_addr,
2111 ip->ip_dst.s_addr, htons(IPPROTO_TCP));
2112 }
2113 *m_head = m;
2114 }
2115
2116 prod = sc->alc_cdata.alc_tx_prod;

--- 1656 unchanged lines hidden ---