diff options
-rw-r--r-- | net/8021q/vlan_dev.c | 2 | ||||
-rw-r--r-- | net/atm/br2684.c | 8 | ||||
-rw-r--r-- | net/core/dev.c | 4 | ||||
-rw-r--r-- | net/ethernet/eth.c | 2 | ||||
-rw-r--r-- | net/ipv4/ipvs/ip_vs_core.c | 4 | ||||
-rw-r--r-- | net/ipv6/ip6_tunnel.c | 4 | ||||
-rw-r--r-- | net/mac80211/wme.c | 2 | ||||
-rw-r--r-- | net/sched/cls_flow.c | 28 | ||||
-rw-r--r-- | net/sched/sch_dsmark.c | 8 | ||||
-rw-r--r-- | net/sched/sch_sfq.c | 4 | ||||
-rw-r--r-- | net/sunrpc/xprtrdma/rpc_rdma.c | 4 |
11 files changed, 35 insertions, 35 deletions
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c index 97688cdb5501..8883e9c8a223 100644 --- a/net/8021q/vlan_dev.c +++ b/net/8021q/vlan_dev.c | |||
@@ -48,7 +48,7 @@ static int vlan_dev_rebuild_header(struct sk_buff *skb) | |||
48 | 48 | ||
49 | switch (veth->h_vlan_encapsulated_proto) { | 49 | switch (veth->h_vlan_encapsulated_proto) { |
50 | #ifdef CONFIG_INET | 50 | #ifdef CONFIG_INET |
51 | case __constant_htons(ETH_P_IP): | 51 | case htons(ETH_P_IP): |
52 | 52 | ||
53 | /* TODO: Confirm this will work with VLAN headers... */ | 53 | /* TODO: Confirm this will work with VLAN headers... */ |
54 | return arp_find(veth->h_dest, skb); | 54 | return arp_find(veth->h_dest, skb); |
diff --git a/net/atm/br2684.c b/net/atm/br2684.c index 8d9a6f158880..280de481edc7 100644 --- a/net/atm/br2684.c +++ b/net/atm/br2684.c | |||
@@ -375,11 +375,11 @@ static void br2684_push(struct atm_vcc *atmvcc, struct sk_buff *skb) | |||
375 | if (memcmp | 375 | if (memcmp |
376 | (skb->data + 6, ethertype_ipv6, | 376 | (skb->data + 6, ethertype_ipv6, |
377 | sizeof(ethertype_ipv6)) == 0) | 377 | sizeof(ethertype_ipv6)) == 0) |
378 | skb->protocol = __constant_htons(ETH_P_IPV6); | 378 | skb->protocol = htons(ETH_P_IPV6); |
379 | else if (memcmp | 379 | else if (memcmp |
380 | (skb->data + 6, ethertype_ipv4, | 380 | (skb->data + 6, ethertype_ipv4, |
381 | sizeof(ethertype_ipv4)) == 0) | 381 | sizeof(ethertype_ipv4)) == 0) |
382 | skb->protocol = __constant_htons(ETH_P_IP); | 382 | skb->protocol = htons(ETH_P_IP); |
383 | else | 383 | else |
384 | goto error; | 384 | goto error; |
385 | skb_pull(skb, sizeof(llc_oui_ipv4)); | 385 | skb_pull(skb, sizeof(llc_oui_ipv4)); |
@@ -404,9 +404,9 @@ static void br2684_push(struct atm_vcc *atmvcc, struct sk_buff *skb) | |||
404 | skb_reset_network_header(skb); | 404 | skb_reset_network_header(skb); |
405 | iph = ip_hdr(skb); | 405 | iph = ip_hdr(skb); |
406 | if (iph->version == 4) | 406 | if (iph->version == 4) |
407 | skb->protocol = __constant_htons(ETH_P_IP); | 407 | skb->protocol = htons(ETH_P_IP); |
408 | else if (iph->version == 6) | 408 | else if (iph->version == 6) |
409 | skb->protocol = __constant_htons(ETH_P_IPV6); | 409 | skb->protocol = htons(ETH_P_IPV6); |
410 | else | 410 | else |
411 | goto error; | 411 | goto error; |
412 | skb->pkt_type = PACKET_HOST; | 412 | skb->pkt_type = PACKET_HOST; |
diff --git a/net/core/dev.c b/net/core/dev.c index f48d1b24f9ce..fdfc4b6a6448 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -1675,13 +1675,13 @@ static u16 simple_tx_hash(struct net_device *dev, struct sk_buff *skb) | |||
1675 | } | 1675 | } |
1676 | 1676 | ||
1677 | switch (skb->protocol) { | 1677 | switch (skb->protocol) { |
1678 | case __constant_htons(ETH_P_IP): | 1678 | case htons(ETH_P_IP): |
1679 | ip_proto = ip_hdr(skb)->protocol; | 1679 | ip_proto = ip_hdr(skb)->protocol; |
1680 | addr1 = ip_hdr(skb)->saddr; | 1680 | addr1 = ip_hdr(skb)->saddr; |
1681 | addr2 = ip_hdr(skb)->daddr; | 1681 | addr2 = ip_hdr(skb)->daddr; |
1682 | ihl = ip_hdr(skb)->ihl; | 1682 | ihl = ip_hdr(skb)->ihl; |
1683 | break; | 1683 | break; |
1684 | case __constant_htons(ETH_P_IPV6): | 1684 | case htons(ETH_P_IPV6): |
1685 | ip_proto = ipv6_hdr(skb)->nexthdr; | 1685 | ip_proto = ipv6_hdr(skb)->nexthdr; |
1686 | addr1 = ipv6_hdr(skb)->saddr.s6_addr32[3]; | 1686 | addr1 = ipv6_hdr(skb)->saddr.s6_addr32[3]; |
1687 | addr2 = ipv6_hdr(skb)->daddr.s6_addr32[3]; | 1687 | addr2 = ipv6_hdr(skb)->daddr.s6_addr32[3]; |
diff --git a/net/ethernet/eth.c b/net/ethernet/eth.c index a80839b02e3f..647a9edee375 100644 --- a/net/ethernet/eth.c +++ b/net/ethernet/eth.c | |||
@@ -129,7 +129,7 @@ int eth_rebuild_header(struct sk_buff *skb) | |||
129 | 129 | ||
130 | switch (eth->h_proto) { | 130 | switch (eth->h_proto) { |
131 | #ifdef CONFIG_INET | 131 | #ifdef CONFIG_INET |
132 | case __constant_htons(ETH_P_IP): | 132 | case htons(ETH_P_IP): |
133 | return arp_find(eth->h_dest, skb); | 133 | return arp_find(eth->h_dest, skb); |
134 | #endif | 134 | #endif |
135 | default: | 135 | default: |
diff --git a/net/ipv4/ipvs/ip_vs_core.c b/net/ipv4/ipvs/ip_vs_core.c index ece748dbd0cd..958abf3e5f8c 100644 --- a/net/ipv4/ipvs/ip_vs_core.c +++ b/net/ipv4/ipvs/ip_vs_core.c | |||
@@ -938,7 +938,7 @@ ip_vs_out(unsigned int hooknum, struct sk_buff *skb, | |||
938 | 938 | ||
939 | EnterFunction(11); | 939 | EnterFunction(11); |
940 | 940 | ||
941 | af = (skb->protocol == __constant_htons(ETH_P_IP)) ? AF_INET : AF_INET6; | 941 | af = (skb->protocol == htons(ETH_P_IP)) ? AF_INET : AF_INET6; |
942 | 942 | ||
943 | if (skb->ipvs_property) | 943 | if (skb->ipvs_property) |
944 | return NF_ACCEPT; | 944 | return NF_ACCEPT; |
@@ -1258,7 +1258,7 @@ ip_vs_in(unsigned int hooknum, struct sk_buff *skb, | |||
1258 | struct ip_vs_conn *cp; | 1258 | struct ip_vs_conn *cp; |
1259 | int ret, restart, af; | 1259 | int ret, restart, af; |
1260 | 1260 | ||
1261 | af = (skb->protocol == __constant_htons(ETH_P_IP)) ? AF_INET : AF_INET6; | 1261 | af = (skb->protocol == htons(ETH_P_IP)) ? AF_INET : AF_INET6; |
1262 | 1262 | ||
1263 | ip_vs_fill_iphdr(af, skb_network_header(skb), &iph); | 1263 | ip_vs_fill_iphdr(af, skb_network_header(skb), &iph); |
1264 | 1264 | ||
diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c index 17c7b098cdb0..64ce3d33d9c6 100644 --- a/net/ipv6/ip6_tunnel.c +++ b/net/ipv6/ip6_tunnel.c | |||
@@ -1050,10 +1050,10 @@ ip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1050 | } | 1050 | } |
1051 | 1051 | ||
1052 | switch (skb->protocol) { | 1052 | switch (skb->protocol) { |
1053 | case __constant_htons(ETH_P_IP): | 1053 | case htons(ETH_P_IP): |
1054 | ret = ip4ip6_tnl_xmit(skb, dev); | 1054 | ret = ip4ip6_tnl_xmit(skb, dev); |
1055 | break; | 1055 | break; |
1056 | case __constant_htons(ETH_P_IPV6): | 1056 | case htons(ETH_P_IPV6): |
1057 | ret = ip6ip6_tnl_xmit(skb, dev); | 1057 | ret = ip6ip6_tnl_xmit(skb, dev); |
1058 | break; | 1058 | break; |
1059 | default: | 1059 | default: |
diff --git a/net/mac80211/wme.c b/net/mac80211/wme.c index 6748dedcab50..c703f8b44e92 100644 --- a/net/mac80211/wme.c +++ b/net/mac80211/wme.c | |||
@@ -39,7 +39,7 @@ static unsigned int classify_1d(struct sk_buff *skb) | |||
39 | return skb->priority - 256; | 39 | return skb->priority - 256; |
40 | 40 | ||
41 | switch (skb->protocol) { | 41 | switch (skb->protocol) { |
42 | case __constant_htons(ETH_P_IP): | 42 | case htons(ETH_P_IP): |
43 | dscp = ip_hdr(skb)->tos & 0xfc; | 43 | dscp = ip_hdr(skb)->tos & 0xfc; |
44 | break; | 44 | break; |
45 | 45 | ||
diff --git a/net/sched/cls_flow.c b/net/sched/cls_flow.c index 8f63a1a94014..0ebaff637e31 100644 --- a/net/sched/cls_flow.c +++ b/net/sched/cls_flow.c | |||
@@ -67,9 +67,9 @@ static inline u32 addr_fold(void *addr) | |||
67 | static u32 flow_get_src(const struct sk_buff *skb) | 67 | static u32 flow_get_src(const struct sk_buff *skb) |
68 | { | 68 | { |
69 | switch (skb->protocol) { | 69 | switch (skb->protocol) { |
70 | case __constant_htons(ETH_P_IP): | 70 | case htons(ETH_P_IP): |
71 | return ntohl(ip_hdr(skb)->saddr); | 71 | return ntohl(ip_hdr(skb)->saddr); |
72 | case __constant_htons(ETH_P_IPV6): | 72 | case htons(ETH_P_IPV6): |
73 | return ntohl(ipv6_hdr(skb)->saddr.s6_addr32[3]); | 73 | return ntohl(ipv6_hdr(skb)->saddr.s6_addr32[3]); |
74 | default: | 74 | default: |
75 | return addr_fold(skb->sk); | 75 | return addr_fold(skb->sk); |
@@ -79,9 +79,9 @@ static u32 flow_get_src(const struct sk_buff *skb) | |||
79 | static u32 flow_get_dst(const struct sk_buff *skb) | 79 | static u32 flow_get_dst(const struct sk_buff *skb) |
80 | { | 80 | { |
81 | switch (skb->protocol) { | 81 | switch (skb->protocol) { |
82 | case __constant_htons(ETH_P_IP): | 82 | case htons(ETH_P_IP): |
83 | return ntohl(ip_hdr(skb)->daddr); | 83 | return ntohl(ip_hdr(skb)->daddr); |
84 | case __constant_htons(ETH_P_IPV6): | 84 | case htons(ETH_P_IPV6): |
85 | return ntohl(ipv6_hdr(skb)->daddr.s6_addr32[3]); | 85 | return ntohl(ipv6_hdr(skb)->daddr.s6_addr32[3]); |
86 | default: | 86 | default: |
87 | return addr_fold(skb->dst) ^ (__force u16)skb->protocol; | 87 | return addr_fold(skb->dst) ^ (__force u16)skb->protocol; |
@@ -91,9 +91,9 @@ static u32 flow_get_dst(const struct sk_buff *skb) | |||
91 | static u32 flow_get_proto(const struct sk_buff *skb) | 91 | static u32 flow_get_proto(const struct sk_buff *skb) |
92 | { | 92 | { |
93 | switch (skb->protocol) { | 93 | switch (skb->protocol) { |
94 | case __constant_htons(ETH_P_IP): | 94 | case htons(ETH_P_IP): |
95 | return ip_hdr(skb)->protocol; | 95 | return ip_hdr(skb)->protocol; |
96 | case __constant_htons(ETH_P_IPV6): | 96 | case htons(ETH_P_IPV6): |
97 | return ipv6_hdr(skb)->nexthdr; | 97 | return ipv6_hdr(skb)->nexthdr; |
98 | default: | 98 | default: |
99 | return 0; | 99 | return 0; |
@@ -120,7 +120,7 @@ static u32 flow_get_proto_src(const struct sk_buff *skb) | |||
120 | u32 res = 0; | 120 | u32 res = 0; |
121 | 121 | ||
122 | switch (skb->protocol) { | 122 | switch (skb->protocol) { |
123 | case __constant_htons(ETH_P_IP): { | 123 | case htons(ETH_P_IP): { |
124 | struct iphdr *iph = ip_hdr(skb); | 124 | struct iphdr *iph = ip_hdr(skb); |
125 | 125 | ||
126 | if (!(iph->frag_off&htons(IP_MF|IP_OFFSET)) && | 126 | if (!(iph->frag_off&htons(IP_MF|IP_OFFSET)) && |
@@ -128,7 +128,7 @@ static u32 flow_get_proto_src(const struct sk_buff *skb) | |||
128 | res = ntohs(*(__be16 *)((void *)iph + iph->ihl * 4)); | 128 | res = ntohs(*(__be16 *)((void *)iph + iph->ihl * 4)); |
129 | break; | 129 | break; |
130 | } | 130 | } |
131 | case __constant_htons(ETH_P_IPV6): { | 131 | case htons(ETH_P_IPV6): { |
132 | struct ipv6hdr *iph = ipv6_hdr(skb); | 132 | struct ipv6hdr *iph = ipv6_hdr(skb); |
133 | 133 | ||
134 | if (has_ports(iph->nexthdr)) | 134 | if (has_ports(iph->nexthdr)) |
@@ -147,7 +147,7 @@ static u32 flow_get_proto_dst(const struct sk_buff *skb) | |||
147 | u32 res = 0; | 147 | u32 res = 0; |
148 | 148 | ||
149 | switch (skb->protocol) { | 149 | switch (skb->protocol) { |
150 | case __constant_htons(ETH_P_IP): { | 150 | case htons(ETH_P_IP): { |
151 | struct iphdr *iph = ip_hdr(skb); | 151 | struct iphdr *iph = ip_hdr(skb); |
152 | 152 | ||
153 | if (!(iph->frag_off&htons(IP_MF|IP_OFFSET)) && | 153 | if (!(iph->frag_off&htons(IP_MF|IP_OFFSET)) && |
@@ -155,7 +155,7 @@ static u32 flow_get_proto_dst(const struct sk_buff *skb) | |||
155 | res = ntohs(*(__be16 *)((void *)iph + iph->ihl * 4 + 2)); | 155 | res = ntohs(*(__be16 *)((void *)iph + iph->ihl * 4 + 2)); |
156 | break; | 156 | break; |
157 | } | 157 | } |
158 | case __constant_htons(ETH_P_IPV6): { | 158 | case htons(ETH_P_IPV6): { |
159 | struct ipv6hdr *iph = ipv6_hdr(skb); | 159 | struct ipv6hdr *iph = ipv6_hdr(skb); |
160 | 160 | ||
161 | if (has_ports(iph->nexthdr)) | 161 | if (has_ports(iph->nexthdr)) |
@@ -213,9 +213,9 @@ static u32 flow_get_nfct(const struct sk_buff *skb) | |||
213 | static u32 flow_get_nfct_src(const struct sk_buff *skb) | 213 | static u32 flow_get_nfct_src(const struct sk_buff *skb) |
214 | { | 214 | { |
215 | switch (skb->protocol) { | 215 | switch (skb->protocol) { |
216 | case __constant_htons(ETH_P_IP): | 216 | case htons(ETH_P_IP): |
217 | return ntohl(CTTUPLE(skb, src.u3.ip)); | 217 | return ntohl(CTTUPLE(skb, src.u3.ip)); |
218 | case __constant_htons(ETH_P_IPV6): | 218 | case htons(ETH_P_IPV6): |
219 | return ntohl(CTTUPLE(skb, src.u3.ip6[3])); | 219 | return ntohl(CTTUPLE(skb, src.u3.ip6[3])); |
220 | } | 220 | } |
221 | fallback: | 221 | fallback: |
@@ -225,9 +225,9 @@ fallback: | |||
225 | static u32 flow_get_nfct_dst(const struct sk_buff *skb) | 225 | static u32 flow_get_nfct_dst(const struct sk_buff *skb) |
226 | { | 226 | { |
227 | switch (skb->protocol) { | 227 | switch (skb->protocol) { |
228 | case __constant_htons(ETH_P_IP): | 228 | case htons(ETH_P_IP): |
229 | return ntohl(CTTUPLE(skb, dst.u3.ip)); | 229 | return ntohl(CTTUPLE(skb, dst.u3.ip)); |
230 | case __constant_htons(ETH_P_IPV6): | 230 | case htons(ETH_P_IPV6): |
231 | return ntohl(CTTUPLE(skb, dst.u3.ip6[3])); | 231 | return ntohl(CTTUPLE(skb, dst.u3.ip6[3])); |
232 | } | 232 | } |
233 | fallback: | 233 | fallback: |
diff --git a/net/sched/sch_dsmark.c b/net/sched/sch_dsmark.c index edd1298f85f6..ba43aab3a851 100644 --- a/net/sched/sch_dsmark.c +++ b/net/sched/sch_dsmark.c | |||
@@ -202,7 +202,7 @@ static int dsmark_enqueue(struct sk_buff *skb, struct Qdisc *sch) | |||
202 | 202 | ||
203 | if (p->set_tc_index) { | 203 | if (p->set_tc_index) { |
204 | switch (skb->protocol) { | 204 | switch (skb->protocol) { |
205 | case __constant_htons(ETH_P_IP): | 205 | case htons(ETH_P_IP): |
206 | if (skb_cow_head(skb, sizeof(struct iphdr))) | 206 | if (skb_cow_head(skb, sizeof(struct iphdr))) |
207 | goto drop; | 207 | goto drop; |
208 | 208 | ||
@@ -210,7 +210,7 @@ static int dsmark_enqueue(struct sk_buff *skb, struct Qdisc *sch) | |||
210 | & ~INET_ECN_MASK; | 210 | & ~INET_ECN_MASK; |
211 | break; | 211 | break; |
212 | 212 | ||
213 | case __constant_htons(ETH_P_IPV6): | 213 | case htons(ETH_P_IPV6): |
214 | if (skb_cow_head(skb, sizeof(struct ipv6hdr))) | 214 | if (skb_cow_head(skb, sizeof(struct ipv6hdr))) |
215 | goto drop; | 215 | goto drop; |
216 | 216 | ||
@@ -289,11 +289,11 @@ static struct sk_buff *dsmark_dequeue(struct Qdisc *sch) | |||
289 | pr_debug("index %d->%d\n", skb->tc_index, index); | 289 | pr_debug("index %d->%d\n", skb->tc_index, index); |
290 | 290 | ||
291 | switch (skb->protocol) { | 291 | switch (skb->protocol) { |
292 | case __constant_htons(ETH_P_IP): | 292 | case htons(ETH_P_IP): |
293 | ipv4_change_dsfield(ip_hdr(skb), p->mask[index], | 293 | ipv4_change_dsfield(ip_hdr(skb), p->mask[index], |
294 | p->value[index]); | 294 | p->value[index]); |
295 | break; | 295 | break; |
296 | case __constant_htons(ETH_P_IPV6): | 296 | case htons(ETH_P_IPV6): |
297 | ipv6_change_dsfield(ipv6_hdr(skb), p->mask[index], | 297 | ipv6_change_dsfield(ipv6_hdr(skb), p->mask[index], |
298 | p->value[index]); | 298 | p->value[index]); |
299 | break; | 299 | break; |
diff --git a/net/sched/sch_sfq.c b/net/sched/sch_sfq.c index 6e041d10dbdb..fe1508ef0d3d 100644 --- a/net/sched/sch_sfq.c +++ b/net/sched/sch_sfq.c | |||
@@ -119,7 +119,7 @@ static unsigned sfq_hash(struct sfq_sched_data *q, struct sk_buff *skb) | |||
119 | u32 h, h2; | 119 | u32 h, h2; |
120 | 120 | ||
121 | switch (skb->protocol) { | 121 | switch (skb->protocol) { |
122 | case __constant_htons(ETH_P_IP): | 122 | case htons(ETH_P_IP): |
123 | { | 123 | { |
124 | const struct iphdr *iph = ip_hdr(skb); | 124 | const struct iphdr *iph = ip_hdr(skb); |
125 | h = iph->daddr; | 125 | h = iph->daddr; |
@@ -134,7 +134,7 @@ static unsigned sfq_hash(struct sfq_sched_data *q, struct sk_buff *skb) | |||
134 | h2 ^= *(((u32*)iph) + iph->ihl); | 134 | h2 ^= *(((u32*)iph) + iph->ihl); |
135 | break; | 135 | break; |
136 | } | 136 | } |
137 | case __constant_htons(ETH_P_IPV6): | 137 | case htons(ETH_P_IPV6): |
138 | { | 138 | { |
139 | struct ipv6hdr *iph = ipv6_hdr(skb); | 139 | struct ipv6hdr *iph = ipv6_hdr(skb); |
140 | h = iph->daddr.s6_addr32[3]; | 140 | h = iph->daddr.s6_addr32[3]; |
diff --git a/net/sunrpc/xprtrdma/rpc_rdma.c b/net/sunrpc/xprtrdma/rpc_rdma.c index e55427f73dfe..5c1954d28d09 100644 --- a/net/sunrpc/xprtrdma/rpc_rdma.c +++ b/net/sunrpc/xprtrdma/rpc_rdma.c | |||
@@ -769,7 +769,7 @@ repost: | |||
769 | /* check for expected message types */ | 769 | /* check for expected message types */ |
770 | /* The order of some of these tests is important. */ | 770 | /* The order of some of these tests is important. */ |
771 | switch (headerp->rm_type) { | 771 | switch (headerp->rm_type) { |
772 | case __constant_htonl(RDMA_MSG): | 772 | case htonl(RDMA_MSG): |
773 | /* never expect read chunks */ | 773 | /* never expect read chunks */ |
774 | /* never expect reply chunks (two ways to check) */ | 774 | /* never expect reply chunks (two ways to check) */ |
775 | /* never expect write chunks without having offered RDMA */ | 775 | /* never expect write chunks without having offered RDMA */ |
@@ -802,7 +802,7 @@ repost: | |||
802 | rpcrdma_inline_fixup(rqst, (char *)iptr, rep->rr_len); | 802 | rpcrdma_inline_fixup(rqst, (char *)iptr, rep->rr_len); |
803 | break; | 803 | break; |
804 | 804 | ||
805 | case __constant_htonl(RDMA_NOMSG): | 805 | case htonl(RDMA_NOMSG): |
806 | /* never expect read or write chunks, always reply chunks */ | 806 | /* never expect read or write chunks, always reply chunks */ |
807 | if (headerp->rm_body.rm_chunks[0] != xdr_zero || | 807 | if (headerp->rm_body.rm_chunks[0] != xdr_zero || |
808 | headerp->rm_body.rm_chunks[1] != xdr_zero || | 808 | headerp->rm_body.rm_chunks[1] != xdr_zero || |