Deleted Added
full compact
if_bce.c (213489) if_bce.c (213844)
1/*-
2 * Copyright (c) 2006-2010 Broadcom Corporation
3 * David Christensen <davidch@broadcom.com>. 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 *

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

24 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
28 * THE POSSIBILITY OF SUCH DAMAGE.
29 */
30
31#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2006-2010 Broadcom Corporation
3 * David Christensen <davidch@broadcom.com>. 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 *

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

24 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
28 * THE POSSIBILITY OF SUCH DAMAGE.
29 */
30
31#include <sys/cdefs.h>
32__FBSDID("$FreeBSD: head/sys/dev/bce/if_bce.c 213489 2010-10-06 18:36:50Z ambrisko $");
32__FBSDID("$FreeBSD: head/sys/dev/bce/if_bce.c 213844 2010-10-14 18:31:40Z yongari $");
33
34/*
35 * The following controllers are supported by this driver:
36 * BCM5706C A2, A3
37 * BCM5706S A2, A3
38 * BCM5708C B1, B2
39 * BCM5708S B1, B2
40 * BCM5709C A1, C0

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

6731 m = m_pullup(*m_head, sizeof(struct ether_header) + ip_hlen +
6732 sizeof(struct tcphdr));
6733 if (m == NULL) {
6734 *m_head = NULL;
6735 return (NULL);
6736 }
6737
6738 /* Get the TCP header length in bytes (min 20) */
33
34/*
35 * The following controllers are supported by this driver:
36 * BCM5706C A2, A3
37 * BCM5706S A2, A3
38 * BCM5708C B1, B2
39 * BCM5708S B1, B2
40 * BCM5709C A1, C0

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

6731 m = m_pullup(*m_head, sizeof(struct ether_header) + ip_hlen +
6732 sizeof(struct tcphdr));
6733 if (m == NULL) {
6734 *m_head = NULL;
6735 return (NULL);
6736 }
6737
6738 /* Get the TCP header length in bytes (min 20) */
6739 ip = (struct ip *)(m->m_data + sizeof(struct ether_header));
6739 th = (struct tcphdr *)((caddr_t)ip + ip_hlen);
6740 tcp_hlen = (th->th_off << 2);
6741
6742 /* Make sure all IP/TCP options live in the same buffer. */
6743 m = m_pullup(*m_head, sizeof(struct ether_header)+ ip_hlen +
6744 tcp_hlen);
6745 if (m == NULL) {
6746 *m_head = NULL;
6747 return (NULL);
6748 }
6749
6750 /* IP header length and checksum will be calc'd by hardware */
6740 th = (struct tcphdr *)((caddr_t)ip + ip_hlen);
6741 tcp_hlen = (th->th_off << 2);
6742
6743 /* Make sure all IP/TCP options live in the same buffer. */
6744 m = m_pullup(*m_head, sizeof(struct ether_header)+ ip_hlen +
6745 tcp_hlen);
6746 if (m == NULL) {
6747 *m_head = NULL;
6748 return (NULL);
6749 }
6750
6751 /* IP header length and checksum will be calc'd by hardware */
6752 ip = (struct ip *)(m->m_data + sizeof(struct ether_header));
6751 ip_len = ip->ip_len;
6752 ip->ip_len = 0;
6753 ip->ip_sum = 0;
6754 break;
6755 case ETHERTYPE_IPV6:
6756 BCE_PRINTF("%s(%d): TSO over IPv6 not supported!.\n",
6757 __FILE__, __LINE__);
6758 m_freem(*m_head);

--- 4149 unchanged lines hidden ---
6753 ip_len = ip->ip_len;
6754 ip->ip_len = 0;
6755 ip->ip_sum = 0;
6756 break;
6757 case ETHERTYPE_IPV6:
6758 BCE_PRINTF("%s(%d): TSO over IPv6 not supported!.\n",
6759 __FILE__, __LINE__);
6760 m_freem(*m_head);

--- 4149 unchanged lines hidden ---