diff options
author | Harvey Harrison <harvey.harrison@gmail.com> | 2009-02-15 01:58:35 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-02-15 01:58:35 -0500 |
commit | f3a7c66b5ce0b75a9774a50b5dcce93e5ba28370 (patch) | |
tree | 441f02ac10cb109cbb80fbd0d964af3638541f06 /include/net | |
parent | 35c26c2cf6a6a2d1c48add732d8ba002bd90784c (diff) |
net: replace __constant_{endian} uses in net headers
Base versions handle constant folding now. For headers exposed to
userspace, we must only expose the __ prefixed versions.
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/inet_ecn.h | 4 | ||||
-rw-r--r-- | include/net/ip_vs.h | 4 | ||||
-rw-r--r-- | include/net/ipv6.h | 4 | ||||
-rw-r--r-- | include/net/ipx.h | 2 | ||||
-rw-r--r-- | include/net/transp_v6.h | 2 |
5 files changed, 8 insertions, 8 deletions
diff --git a/include/net/inet_ecn.h b/include/net/inet_ecn.h index 7040a782c656..9b5d08f4f6e8 100644 --- a/include/net/inet_ecn.h +++ b/include/net/inet_ecn.h | |||
@@ -113,12 +113,12 @@ static inline void ipv6_copy_dscp(unsigned int dscp, struct ipv6hdr *inner) | |||
113 | static inline int INET_ECN_set_ce(struct sk_buff *skb) | 113 | static inline int INET_ECN_set_ce(struct sk_buff *skb) |
114 | { | 114 | { |
115 | switch (skb->protocol) { | 115 | switch (skb->protocol) { |
116 | case __constant_htons(ETH_P_IP): | 116 | case cpu_to_be16(ETH_P_IP): |
117 | if (skb->network_header + sizeof(struct iphdr) <= skb->tail) | 117 | if (skb->network_header + sizeof(struct iphdr) <= skb->tail) |
118 | return IP_ECN_set_ce(ip_hdr(skb)); | 118 | return IP_ECN_set_ce(ip_hdr(skb)); |
119 | break; | 119 | break; |
120 | 120 | ||
121 | case __constant_htons(ETH_P_IPV6): | 121 | case cpu_to_be16(ETH_P_IPV6): |
122 | if (skb->network_header + sizeof(struct ipv6hdr) <= skb->tail) | 122 | if (skb->network_header + sizeof(struct ipv6hdr) <= skb->tail) |
123 | return IP6_ECN_set_ce(ipv6_hdr(skb)); | 123 | return IP6_ECN_set_ce(ipv6_hdr(skb)); |
124 | break; | 124 | break; |
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h index ab9b003ab671..bbae1e87efcd 100644 --- a/include/net/ip_vs.h +++ b/include/net/ip_vs.h | |||
@@ -184,8 +184,8 @@ static inline const char *ip_vs_dbg_addr(int af, char *buf, size_t buf_len, | |||
184 | /* | 184 | /* |
185 | * The port number of FTP service (in network order). | 185 | * The port number of FTP service (in network order). |
186 | */ | 186 | */ |
187 | #define FTPPORT __constant_htons(21) | 187 | #define FTPPORT cpu_to_be16(21) |
188 | #define FTPDATA __constant_htons(20) | 188 | #define FTPDATA cpu_to_be16(20) |
189 | 189 | ||
190 | /* | 190 | /* |
191 | * TCP State Values | 191 | * TCP State Values |
diff --git a/include/net/ipv6.h b/include/net/ipv6.h index 6d5b58a1c743..c1f16fc49ade 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h | |||
@@ -196,8 +196,8 @@ struct ip6_flowlabel | |||
196 | struct net *fl_net; | 196 | struct net *fl_net; |
197 | }; | 197 | }; |
198 | 198 | ||
199 | #define IPV6_FLOWINFO_MASK __constant_htonl(0x0FFFFFFF) | 199 | #define IPV6_FLOWINFO_MASK cpu_to_be32(0x0FFFFFFF) |
200 | #define IPV6_FLOWLABEL_MASK __constant_htonl(0x000FFFFF) | 200 | #define IPV6_FLOWLABEL_MASK cpu_to_be32(0x000FFFFF) |
201 | 201 | ||
202 | struct ipv6_fl_socklist | 202 | struct ipv6_fl_socklist |
203 | { | 203 | { |
diff --git a/include/net/ipx.h b/include/net/ipx.h index 4cc0b4eca948..a14121dd1932 100644 --- a/include/net/ipx.h +++ b/include/net/ipx.h | |||
@@ -27,7 +27,7 @@ struct ipx_address { | |||
27 | 27 | ||
28 | struct ipxhdr { | 28 | struct ipxhdr { |
29 | __be16 ipx_checksum __attribute__ ((packed)); | 29 | __be16 ipx_checksum __attribute__ ((packed)); |
30 | #define IPX_NO_CHECKSUM __constant_htons(0xFFFF) | 30 | #define IPX_NO_CHECKSUM cpu_to_be16(0xFFFF) |
31 | __be16 ipx_pktsize __attribute__ ((packed)); | 31 | __be16 ipx_pktsize __attribute__ ((packed)); |
32 | __u8 ipx_tctrl; | 32 | __u8 ipx_tctrl; |
33 | __u8 ipx_type; | 33 | __u8 ipx_type; |
diff --git a/include/net/transp_v6.h b/include/net/transp_v6.h index 876b6f2bb4fd..bfb240c6cf79 100644 --- a/include/net/transp_v6.h +++ b/include/net/transp_v6.h | |||
@@ -46,7 +46,7 @@ extern int datagram_send_ctl(struct net *net, | |||
46 | struct ipv6_txoptions *opt, | 46 | struct ipv6_txoptions *opt, |
47 | int *hlimit, int *tclass); | 47 | int *hlimit, int *tclass); |
48 | 48 | ||
49 | #define LOOPBACK4_IPV6 __constant_htonl(0x7f000006) | 49 | #define LOOPBACK4_IPV6 cpu_to_be32(0x7f000006) |
50 | 50 | ||
51 | /* | 51 | /* |
52 | * address family specific functions | 52 | * address family specific functions |