aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/core
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2007-12-16 16:47:33 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 17:58:17 -0500
commit6360a02af1599e46b023ccbb85545ed97c6f662c (patch)
tree55f2cfdf0a34c98fcf47e7534558d1eef7d8f153 /drivers/infiniband/core
parentb5cb2bbc4c6cb489941be881e8adfe136ee45b8e (diff)
[IPV4] drivers/infiniband: Use ipv4_is_<type>
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/infiniband/core')
-rw-r--r--drivers/infiniband/core/addr.c4
-rw-r--r--drivers/infiniband/core/cma.c5
2 files changed, 5 insertions, 4 deletions
diff --git a/drivers/infiniband/core/addr.c b/drivers/infiniband/core/addr.c
index 5381c80de10a..0802b79c552d 100644
--- a/drivers/infiniband/core/addr.c
+++ b/drivers/infiniband/core/addr.c
@@ -265,11 +265,11 @@ static int addr_resolve_local(struct sockaddr_in *src_in,
265 if (!dev) 265 if (!dev)
266 return -EADDRNOTAVAIL; 266 return -EADDRNOTAVAIL;
267 267
268 if (ZERONET(src_ip)) { 268 if (ipv4_is_zeronet(src_ip)) {
269 src_in->sin_family = dst_in->sin_family; 269 src_in->sin_family = dst_in->sin_family;
270 src_in->sin_addr.s_addr = dst_ip; 270 src_in->sin_addr.s_addr = dst_ip;
271 ret = rdma_copy_addr(addr, dev, dev->dev_addr); 271 ret = rdma_copy_addr(addr, dev, dev->dev_addr);
272 } else if (LOOPBACK(src_ip)) { 272 } else if (ipv4_is_loopback(src_ip)) {
273 ret = rdma_translate_ip((struct sockaddr *)dst_in, addr); 273 ret = rdma_translate_ip((struct sockaddr *)dst_in, addr);
274 if (!ret) 274 if (!ret)
275 memcpy(addr->dst_dev_addr, dev->dev_addr, MAX_ADDR_LEN); 275 memcpy(addr->dst_dev_addr, dev->dev_addr, MAX_ADDR_LEN);
diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c
index 637efead97a0..15b7e9fb615a 100644
--- a/drivers/infiniband/core/cma.c
+++ b/drivers/infiniband/core/cma.c
@@ -630,7 +630,8 @@ static inline int cma_zero_addr(struct sockaddr *addr)
630 struct in6_addr *ip6; 630 struct in6_addr *ip6;
631 631
632 if (addr->sa_family == AF_INET) 632 if (addr->sa_family == AF_INET)
633 return ZERONET(((struct sockaddr_in *) addr)->sin_addr.s_addr); 633 return ipv4_is_zeronet(
634 ((struct sockaddr_in *)addr)->sin_addr.s_addr);
634 else { 635 else {
635 ip6 = &((struct sockaddr_in6 *) addr)->sin6_addr; 636 ip6 = &((struct sockaddr_in6 *) addr)->sin6_addr;
636 return (ip6->s6_addr32[0] | ip6->s6_addr32[1] | 637 return (ip6->s6_addr32[0] | ip6->s6_addr32[1] |
@@ -640,7 +641,7 @@ static inline int cma_zero_addr(struct sockaddr *addr)
640 641
641static inline int cma_loopback_addr(struct sockaddr *addr) 642static inline int cma_loopback_addr(struct sockaddr *addr)
642{ 643{
643 return LOOPBACK(((struct sockaddr_in *) addr)->sin_addr.s_addr); 644 return ipv4_is_loopback(((struct sockaddr_in *) addr)->sin_addr.s_addr);
644} 645}
645 646
646static inline int cma_any_addr(struct sockaddr *addr) 647static inline int cma_any_addr(struct sockaddr *addr)