diff options
Diffstat (limited to 'drivers/net/ethernet/intel/ixgbe/ixgbe_main.c')
-rw-r--r-- | drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c index c773d6cb6063..02271f6d9a17 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | |||
@@ -1539,7 +1539,7 @@ static unsigned int ixgbe_get_headlen(unsigned char *data, | |||
1539 | hdr.network += ETH_HLEN; | 1539 | hdr.network += ETH_HLEN; |
1540 | 1540 | ||
1541 | /* handle any vlan tag if present */ | 1541 | /* handle any vlan tag if present */ |
1542 | if (protocol == __constant_htons(ETH_P_8021Q)) { | 1542 | if (protocol == htons(ETH_P_8021Q)) { |
1543 | if ((hdr.network - data) > (max_len - VLAN_HLEN)) | 1543 | if ((hdr.network - data) > (max_len - VLAN_HLEN)) |
1544 | return max_len; | 1544 | return max_len; |
1545 | 1545 | ||
@@ -1548,7 +1548,7 @@ static unsigned int ixgbe_get_headlen(unsigned char *data, | |||
1548 | } | 1548 | } |
1549 | 1549 | ||
1550 | /* handle L3 protocols */ | 1550 | /* handle L3 protocols */ |
1551 | if (protocol == __constant_htons(ETH_P_IP)) { | 1551 | if (protocol == htons(ETH_P_IP)) { |
1552 | if ((hdr.network - data) > (max_len - sizeof(struct iphdr))) | 1552 | if ((hdr.network - data) > (max_len - sizeof(struct iphdr))) |
1553 | return max_len; | 1553 | return max_len; |
1554 | 1554 | ||
@@ -1562,7 +1562,7 @@ static unsigned int ixgbe_get_headlen(unsigned char *data, | |||
1562 | /* record next protocol if header is present */ | 1562 | /* record next protocol if header is present */ |
1563 | if (!(hdr.ipv4->frag_off & htons(IP_OFFSET))) | 1563 | if (!(hdr.ipv4->frag_off & htons(IP_OFFSET))) |
1564 | nexthdr = hdr.ipv4->protocol; | 1564 | nexthdr = hdr.ipv4->protocol; |
1565 | } else if (protocol == __constant_htons(ETH_P_IPV6)) { | 1565 | } else if (protocol == htons(ETH_P_IPV6)) { |
1566 | if ((hdr.network - data) > (max_len - sizeof(struct ipv6hdr))) | 1566 | if ((hdr.network - data) > (max_len - sizeof(struct ipv6hdr))) |
1567 | return max_len; | 1567 | return max_len; |
1568 | 1568 | ||
@@ -1570,7 +1570,7 @@ static unsigned int ixgbe_get_headlen(unsigned char *data, | |||
1570 | nexthdr = hdr.ipv6->nexthdr; | 1570 | nexthdr = hdr.ipv6->nexthdr; |
1571 | hlen = sizeof(struct ipv6hdr); | 1571 | hlen = sizeof(struct ipv6hdr); |
1572 | #ifdef IXGBE_FCOE | 1572 | #ifdef IXGBE_FCOE |
1573 | } else if (protocol == __constant_htons(ETH_P_FCOE)) { | 1573 | } else if (protocol == htons(ETH_P_FCOE)) { |
1574 | if ((hdr.network - data) > (max_len - FCOE_HEADER_LEN)) | 1574 | if ((hdr.network - data) > (max_len - FCOE_HEADER_LEN)) |
1575 | return max_len; | 1575 | return max_len; |
1576 | hlen = FCOE_HEADER_LEN; | 1576 | hlen = FCOE_HEADER_LEN; |
@@ -6520,7 +6520,7 @@ static int ixgbe_tso(struct ixgbe_ring *tx_ring, | |||
6520 | /* ADV DTYP TUCMD MKRLOC/ISCSIHEDLEN */ | 6520 | /* ADV DTYP TUCMD MKRLOC/ISCSIHEDLEN */ |
6521 | type_tucmd = IXGBE_ADVTXD_TUCMD_L4T_TCP; | 6521 | type_tucmd = IXGBE_ADVTXD_TUCMD_L4T_TCP; |
6522 | 6522 | ||
6523 | if (first->protocol == __constant_htons(ETH_P_IP)) { | 6523 | if (first->protocol == htons(ETH_P_IP)) { |
6524 | struct iphdr *iph = ip_hdr(skb); | 6524 | struct iphdr *iph = ip_hdr(skb); |
6525 | iph->tot_len = 0; | 6525 | iph->tot_len = 0; |
6526 | iph->check = 0; | 6526 | iph->check = 0; |
@@ -6580,12 +6580,12 @@ static void ixgbe_tx_csum(struct ixgbe_ring *tx_ring, | |||
6580 | } else { | 6580 | } else { |
6581 | u8 l4_hdr = 0; | 6581 | u8 l4_hdr = 0; |
6582 | switch (first->protocol) { | 6582 | switch (first->protocol) { |
6583 | case __constant_htons(ETH_P_IP): | 6583 | case htons(ETH_P_IP): |
6584 | vlan_macip_lens |= skb_network_header_len(skb); | 6584 | vlan_macip_lens |= skb_network_header_len(skb); |
6585 | type_tucmd |= IXGBE_ADVTXD_TUCMD_IPV4; | 6585 | type_tucmd |= IXGBE_ADVTXD_TUCMD_IPV4; |
6586 | l4_hdr = ip_hdr(skb)->protocol; | 6586 | l4_hdr = ip_hdr(skb)->protocol; |
6587 | break; | 6587 | break; |
6588 | case __constant_htons(ETH_P_IPV6): | 6588 | case htons(ETH_P_IPV6): |
6589 | vlan_macip_lens |= skb_network_header_len(skb); | 6589 | vlan_macip_lens |= skb_network_header_len(skb); |
6590 | l4_hdr = ipv6_hdr(skb)->nexthdr; | 6590 | l4_hdr = ipv6_hdr(skb)->nexthdr; |
6591 | break; | 6591 | break; |
@@ -6860,9 +6860,9 @@ static void ixgbe_atr(struct ixgbe_ring *ring, | |||
6860 | hdr.network = skb_network_header(first->skb); | 6860 | hdr.network = skb_network_header(first->skb); |
6861 | 6861 | ||
6862 | /* Currently only IPv4/IPv6 with TCP is supported */ | 6862 | /* Currently only IPv4/IPv6 with TCP is supported */ |
6863 | if ((first->protocol != __constant_htons(ETH_P_IPV6) || | 6863 | if ((first->protocol != htons(ETH_P_IPV6) || |
6864 | hdr.ipv6->nexthdr != IPPROTO_TCP) && | 6864 | hdr.ipv6->nexthdr != IPPROTO_TCP) && |
6865 | (first->protocol != __constant_htons(ETH_P_IP) || | 6865 | (first->protocol != htons(ETH_P_IP) || |
6866 | hdr.ipv4->protocol != IPPROTO_TCP)) | 6866 | hdr.ipv4->protocol != IPPROTO_TCP)) |
6867 | return; | 6867 | return; |
6868 | 6868 | ||
@@ -6895,12 +6895,12 @@ static void ixgbe_atr(struct ixgbe_ring *ring, | |||
6895 | * and write the value to source port portion of compressed dword | 6895 | * and write the value to source port portion of compressed dword |
6896 | */ | 6896 | */ |
6897 | if (first->tx_flags & (IXGBE_TX_FLAGS_SW_VLAN | IXGBE_TX_FLAGS_HW_VLAN)) | 6897 | if (first->tx_flags & (IXGBE_TX_FLAGS_SW_VLAN | IXGBE_TX_FLAGS_HW_VLAN)) |
6898 | common.port.src ^= th->dest ^ __constant_htons(ETH_P_8021Q); | 6898 | common.port.src ^= th->dest ^ htons(ETH_P_8021Q); |
6899 | else | 6899 | else |
6900 | common.port.src ^= th->dest ^ first->protocol; | 6900 | common.port.src ^= th->dest ^ first->protocol; |
6901 | common.port.dst ^= th->source; | 6901 | common.port.dst ^= th->source; |
6902 | 6902 | ||
6903 | if (first->protocol == __constant_htons(ETH_P_IP)) { | 6903 | if (first->protocol == htons(ETH_P_IP)) { |
6904 | input.formatted.flow_type = IXGBE_ATR_FLOW_TYPE_TCPV4; | 6904 | input.formatted.flow_type = IXGBE_ATR_FLOW_TYPE_TCPV4; |
6905 | common.ip ^= hdr.ipv4->saddr ^ hdr.ipv4->daddr; | 6905 | common.ip ^= hdr.ipv4->saddr ^ hdr.ipv4->daddr; |
6906 | } else { | 6906 | } else { |
@@ -6966,8 +6966,8 @@ static u16 ixgbe_select_queue(struct net_device *dev, struct sk_buff *skb, | |||
6966 | * or FIP and we have FCoE enabled on the adapter | 6966 | * or FIP and we have FCoE enabled on the adapter |
6967 | */ | 6967 | */ |
6968 | switch (vlan_get_protocol(skb)) { | 6968 | switch (vlan_get_protocol(skb)) { |
6969 | case __constant_htons(ETH_P_FCOE): | 6969 | case htons(ETH_P_FCOE): |
6970 | case __constant_htons(ETH_P_FIP): | 6970 | case htons(ETH_P_FIP): |
6971 | adapter = netdev_priv(dev); | 6971 | adapter = netdev_priv(dev); |
6972 | 6972 | ||
6973 | if (adapter->flags & IXGBE_FLAG_FCOE_ENABLED) | 6973 | if (adapter->flags & IXGBE_FLAG_FCOE_ENABLED) |
@@ -7028,7 +7028,7 @@ netdev_tx_t ixgbe_xmit_frame_ring(struct sk_buff *skb, | |||
7028 | tx_flags |= vlan_tx_tag_get(skb) << IXGBE_TX_FLAGS_VLAN_SHIFT; | 7028 | tx_flags |= vlan_tx_tag_get(skb) << IXGBE_TX_FLAGS_VLAN_SHIFT; |
7029 | tx_flags |= IXGBE_TX_FLAGS_HW_VLAN; | 7029 | tx_flags |= IXGBE_TX_FLAGS_HW_VLAN; |
7030 | /* else if it is a SW VLAN check the next protocol and store the tag */ | 7030 | /* else if it is a SW VLAN check the next protocol and store the tag */ |
7031 | } else if (protocol == __constant_htons(ETH_P_8021Q)) { | 7031 | } else if (protocol == htons(ETH_P_8021Q)) { |
7032 | struct vlan_hdr *vhdr, _vhdr; | 7032 | struct vlan_hdr *vhdr, _vhdr; |
7033 | vhdr = skb_header_pointer(skb, ETH_HLEN, sizeof(_vhdr), &_vhdr); | 7033 | vhdr = skb_header_pointer(skb, ETH_HLEN, sizeof(_vhdr), &_vhdr); |
7034 | if (!vhdr) | 7034 | if (!vhdr) |
@@ -7087,7 +7087,7 @@ netdev_tx_t ixgbe_xmit_frame_ring(struct sk_buff *skb, | |||
7087 | 7087 | ||
7088 | #ifdef IXGBE_FCOE | 7088 | #ifdef IXGBE_FCOE |
7089 | /* setup tx offload for FCoE */ | 7089 | /* setup tx offload for FCoE */ |
7090 | if ((protocol == __constant_htons(ETH_P_FCOE)) && | 7090 | if ((protocol == htons(ETH_P_FCOE)) && |
7091 | (tx_ring->netdev->features & (NETIF_F_FSO | NETIF_F_FCOE_CRC))) { | 7091 | (tx_ring->netdev->features & (NETIF_F_FSO | NETIF_F_FCOE_CRC))) { |
7092 | tso = ixgbe_fso(tx_ring, first, &hdr_len); | 7092 | tso = ixgbe_fso(tx_ring, first, &hdr_len); |
7093 | if (tso < 0) | 7093 | if (tso < 0) |