diff options
author | Jiri Pirko <jpirko@redhat.com> | 2010-02-24 00:11:08 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-02-26 07:22:27 -0500 |
commit | fbf219f1c89b15e90ec2db5a3e9636376dc623db (patch) | |
tree | a61f07cad8a0d2b0db1cb2111e6bd624313b1459 /drivers/infiniband/ulp/ipoib/ipoib_multicast.c | |
parent | 6e17d45ae310758ab30623a42ad070858c9a48de (diff) |
infiniband: convert to use netdev_for_each_mc_addr
Due to the loop complexicity in nes_nic.c, I'm using char* to copy mc addresses
to it.
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/infiniband/ulp/ipoib/ipoib_multicast.c')
-rw-r--r-- | drivers/infiniband/ulp/ipoib/ipoib_multicast.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c index 8763c1ea5eb4..19eba3c877cb 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c | |||
@@ -767,11 +767,8 @@ void ipoib_mcast_dev_flush(struct net_device *dev) | |||
767 | } | 767 | } |
768 | } | 768 | } |
769 | 769 | ||
770 | static int ipoib_mcast_addr_is_valid(const u8 *addr, unsigned int addrlen, | 770 | static int ipoib_mcast_addr_is_valid(const u8 *addr, const u8 *broadcast) |
771 | const u8 *broadcast) | ||
772 | { | 771 | { |
773 | if (addrlen != INFINIBAND_ALEN) | ||
774 | return 0; | ||
775 | /* reserved QPN, prefix, scope */ | 772 | /* reserved QPN, prefix, scope */ |
776 | if (memcmp(addr, broadcast, 6)) | 773 | if (memcmp(addr, broadcast, 6)) |
777 | return 0; | 774 | return 0; |
@@ -811,11 +808,10 @@ void ipoib_mcast_restart_task(struct work_struct *work) | |||
811 | clear_bit(IPOIB_MCAST_FLAG_FOUND, &mcast->flags); | 808 | clear_bit(IPOIB_MCAST_FLAG_FOUND, &mcast->flags); |
812 | 809 | ||
813 | /* Mark all of the entries that are found or don't exist */ | 810 | /* Mark all of the entries that are found or don't exist */ |
814 | for (mclist = dev->mc_list; mclist; mclist = mclist->next) { | 811 | netdev_for_each_mc_addr(mclist, dev) { |
815 | union ib_gid mgid; | 812 | union ib_gid mgid; |
816 | 813 | ||
817 | if (!ipoib_mcast_addr_is_valid(mclist->dmi_addr, | 814 | if (!ipoib_mcast_addr_is_valid(mclist->dmi_addr, |
818 | mclist->dmi_addrlen, | ||
819 | dev->broadcast)) | 815 | dev->broadcast)) |
820 | continue; | 816 | continue; |
821 | 817 | ||