diff options
| author | Jesse Brandeburg <jesse.brandeburg@intel.com> | 2013-11-28 01:39:29 -0500 |
|---|---|---|
| committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2014-01-05 01:31:22 -0500 |
| commit | 0e2fe46ca7ae2beb068ea171cf181bb4e028eae1 (patch) | |
| tree | 3a3da96f4831adfd287a258c591b03fde45cfd8b | |
| parent | e5e0a5db4cd4eadfc7a45009c261f35a5ee6a24a (diff) | |
i40e: fix constant cast issues
replace __constant_htons with htons
Change-Id: I123a5318bae34c8b004c71db07c56f137c685849
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| -rw-r--r-- | drivers/net/ethernet/intel/i40e/i40e_txrx.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c index a9784511aca5..2584d6b610ee 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c +++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c | |||
| @@ -1317,7 +1317,7 @@ static int i40e_tx_prepare_vlan_flags(struct sk_buff *skb, | |||
| 1317 | tx_flags |= vlan_tx_tag_get(skb) << I40E_TX_FLAGS_VLAN_SHIFT; | 1317 | tx_flags |= vlan_tx_tag_get(skb) << I40E_TX_FLAGS_VLAN_SHIFT; |
| 1318 | tx_flags |= I40E_TX_FLAGS_HW_VLAN; | 1318 | tx_flags |= I40E_TX_FLAGS_HW_VLAN; |
| 1319 | /* else if it is a SW VLAN, check the next protocol and store the tag */ | 1319 | /* else if it is a SW VLAN, check the next protocol and store the tag */ |
| 1320 | } else if (protocol == __constant_htons(ETH_P_8021Q)) { | 1320 | } else if (protocol == htons(ETH_P_8021Q)) { |
| 1321 | struct vlan_hdr *vhdr, _vhdr; | 1321 | struct vlan_hdr *vhdr, _vhdr; |
| 1322 | vhdr = skb_header_pointer(skb, ETH_HLEN, sizeof(_vhdr), &_vhdr); | 1322 | vhdr = skb_header_pointer(skb, ETH_HLEN, sizeof(_vhdr), &_vhdr); |
| 1323 | if (!vhdr) | 1323 | if (!vhdr) |
| @@ -1382,7 +1382,7 @@ static int i40e_tso(struct i40e_ring *tx_ring, struct sk_buff *skb, | |||
| 1382 | return err; | 1382 | return err; |
| 1383 | } | 1383 | } |
| 1384 | 1384 | ||
| 1385 | if (protocol == __constant_htons(ETH_P_IP)) { | 1385 | if (protocol == htons(ETH_P_IP)) { |
| 1386 | iph = skb->encapsulation ? inner_ip_hdr(skb) : ip_hdr(skb); | 1386 | iph = skb->encapsulation ? inner_ip_hdr(skb) : ip_hdr(skb); |
| 1387 | tcph = skb->encapsulation ? inner_tcp_hdr(skb) : tcp_hdr(skb); | 1387 | tcph = skb->encapsulation ? inner_tcp_hdr(skb) : tcp_hdr(skb); |
| 1388 | iph->tot_len = 0; | 1388 | iph->tot_len = 0; |
| @@ -1805,9 +1805,9 @@ static netdev_tx_t i40e_xmit_frame_ring(struct sk_buff *skb, | |||
| 1805 | first = &tx_ring->tx_bi[tx_ring->next_to_use]; | 1805 | first = &tx_ring->tx_bi[tx_ring->next_to_use]; |
| 1806 | 1806 | ||
| 1807 | /* setup IPv4/IPv6 offloads */ | 1807 | /* setup IPv4/IPv6 offloads */ |
| 1808 | if (protocol == __constant_htons(ETH_P_IP)) | 1808 | if (protocol == htons(ETH_P_IP)) |
| 1809 | tx_flags |= I40E_TX_FLAGS_IPV4; | 1809 | tx_flags |= I40E_TX_FLAGS_IPV4; |
| 1810 | else if (protocol == __constant_htons(ETH_P_IPV6)) | 1810 | else if (protocol == htons(ETH_P_IPV6)) |
| 1811 | tx_flags |= I40E_TX_FLAGS_IPV6; | 1811 | tx_flags |= I40E_TX_FLAGS_IPV6; |
| 1812 | 1812 | ||
| 1813 | tso = i40e_tso(tx_ring, skb, tx_flags, protocol, &hdr_len, | 1813 | tso = i40e_tso(tx_ring, skb, tx_flags, protocol, &hdr_len, |
