diff options
author | Harvey Harrison <harvey.harrison@gmail.com> | 2009-02-01 03:45:17 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-02-01 03:45:17 -0500 |
commit | 09640e6365c679b5642b1c41b6d7078f51689ddf (patch) | |
tree | a2b80c153bd23fe59db8c6994fda29923819fcea /drivers/net/hamachi.c | |
parent | ee437770c42088b9b653e8b3bf28a61fa647f84e (diff) |
net: replace uses of __constant_{endian}
Base versions handle constant folding now.
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/hamachi.c')
-rw-r--r-- | drivers/net/hamachi.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/hamachi.c b/drivers/net/hamachi.c index 7e8b3c59a7d6..455641f8677e 100644 --- a/drivers/net/hamachi.c +++ b/drivers/net/hamachi.c | |||
@@ -1244,7 +1244,7 @@ do { \ | |||
1244 | csum_add(sum, (ih)->saddr & 0xffff); \ | 1244 | csum_add(sum, (ih)->saddr & 0xffff); \ |
1245 | csum_add(sum, (ih)->daddr >> 16); \ | 1245 | csum_add(sum, (ih)->daddr >> 16); \ |
1246 | csum_add(sum, (ih)->daddr & 0xffff); \ | 1246 | csum_add(sum, (ih)->daddr & 0xffff); \ |
1247 | csum_add(sum, __constant_htons(IPPROTO_UDP)); \ | 1247 | csum_add(sum, cpu_to_be16(IPPROTO_UDP)); \ |
1248 | csum_add(sum, (uh)->len); \ | 1248 | csum_add(sum, (uh)->len); \ |
1249 | } while (0) | 1249 | } while (0) |
1250 | 1250 | ||
@@ -1255,7 +1255,7 @@ do { \ | |||
1255 | csum_add(sum, (ih)->saddr & 0xffff); \ | 1255 | csum_add(sum, (ih)->saddr & 0xffff); \ |
1256 | csum_add(sum, (ih)->daddr >> 16); \ | 1256 | csum_add(sum, (ih)->daddr >> 16); \ |
1257 | csum_add(sum, (ih)->daddr & 0xffff); \ | 1257 | csum_add(sum, (ih)->daddr & 0xffff); \ |
1258 | csum_add(sum, __constant_htons(IPPROTO_TCP)); \ | 1258 | csum_add(sum, cpu_to_be16(IPPROTO_TCP)); \ |
1259 | csum_add(sum, htons(len)); \ | 1259 | csum_add(sum, htons(len)); \ |
1260 | } while (0) | 1260 | } while (0) |
1261 | #endif | 1261 | #endif |
@@ -1296,7 +1296,7 @@ static int hamachi_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1296 | /* tack on checksum tag */ | 1296 | /* tack on checksum tag */ |
1297 | u32 tagval = 0; | 1297 | u32 tagval = 0; |
1298 | struct ethhdr *eh = (struct ethhdr *)skb->data; | 1298 | struct ethhdr *eh = (struct ethhdr *)skb->data; |
1299 | if (eh->h_proto == __constant_htons(ETH_P_IP)) { | 1299 | if (eh->h_proto == cpu_to_be16(ETH_P_IP)) { |
1300 | struct iphdr *ih = (struct iphdr *)((char *)eh + ETH_HLEN); | 1300 | struct iphdr *ih = (struct iphdr *)((char *)eh + ETH_HLEN); |
1301 | if (ih->protocol == IPPROTO_UDP) { | 1301 | if (ih->protocol == IPPROTO_UDP) { |
1302 | struct udphdr *uh | 1302 | struct udphdr *uh |
@@ -1605,7 +1605,7 @@ static int hamachi_rx(struct net_device *dev) | |||
1605 | */ | 1605 | */ |
1606 | if (ntohs(ih->tot_len) >= 46){ | 1606 | if (ntohs(ih->tot_len) >= 46){ |
1607 | /* don't worry about frags */ | 1607 | /* don't worry about frags */ |
1608 | if (!(ih->frag_off & __constant_htons(IP_MF|IP_OFFSET))) { | 1608 | if (!(ih->frag_off & cpu_to_be16(IP_MF|IP_OFFSET))) { |
1609 | u32 inv = *(u32 *) &buf_addr[data_size - 16]; | 1609 | u32 inv = *(u32 *) &buf_addr[data_size - 16]; |
1610 | u32 *p = (u32 *) &buf_addr[data_size - 20]; | 1610 | u32 *p = (u32 *) &buf_addr[data_size - 20]; |
1611 | register u32 crc, p_r, p_r1; | 1611 | register u32 crc, p_r, p_r1; |