diff options
Diffstat (limited to 'drivers/infiniband/ulp')
-rw-r--r-- | drivers/infiniband/ulp/ipoib/ipoib_multicast.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c index d41ea27be5e1..c8a0f7dab5b0 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; |
@@ -786,7 +783,7 @@ void ipoib_mcast_restart_task(struct work_struct *work) | |||
786 | struct ipoib_dev_priv *priv = | 783 | struct ipoib_dev_priv *priv = |
787 | container_of(work, struct ipoib_dev_priv, restart_task); | 784 | container_of(work, struct ipoib_dev_priv, restart_task); |
788 | struct net_device *dev = priv->dev; | 785 | struct net_device *dev = priv->dev; |
789 | struct dev_mc_list *mclist; | 786 | struct netdev_hw_addr *ha; |
790 | struct ipoib_mcast *mcast, *tmcast; | 787 | struct ipoib_mcast *mcast, *tmcast; |
791 | LIST_HEAD(remove_list); | 788 | LIST_HEAD(remove_list); |
792 | unsigned long flags; | 789 | unsigned long flags; |
@@ -811,15 +808,13 @@ 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 | netdev_for_each_mc_addr(mclist, dev) { | 811 | netdev_for_each_mc_addr(ha, 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(ha->addr, dev->broadcast)) |
818 | mclist->dmi_addrlen, | ||
819 | dev->broadcast)) | ||
820 | continue; | 815 | continue; |
821 | 816 | ||
822 | memcpy(mgid.raw, mclist->dmi_addr + 4, sizeof mgid); | 817 | memcpy(mgid.raw, ha->addr + 4, sizeof mgid); |
823 | 818 | ||
824 | mcast = __ipoib_mcast_find(dev, &mgid); | 819 | mcast = __ipoib_mcast_find(dev, &mgid); |
825 | if (!mcast || test_bit(IPOIB_MCAST_FLAG_SENDONLY, &mcast->flags)) { | 820 | if (!mcast || test_bit(IPOIB_MCAST_FLAG_SENDONLY, &mcast->flags)) { |