aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorJiri Pirko <jpirko@redhat.com>2010-04-01 17:22:57 -0400
committerDavid S. Miller <davem@davemloft.net>2010-04-03 17:22:15 -0400
commit22bedad3ce112d5ca1eaf043d4990fa2ed698c87 (patch)
treeb6fba5688d48b1396f01d13ee53610dea7749c15 /drivers/infiniband
parenta748ee2426817a95b1f03012d8f339c45c722ae1 (diff)
net: convert multicast list to list_head
Converts the list and the core manipulating with it to be the same as uc_list. +uses two functions for adding/removing mc address (normal and "global" variant) instead of a function parameter. +removes dev_mcast.c completely. +exposes netdev_hw_addr_list_* macros along with __hw_addr_* functions for manipulation with lists on a sandbox (used in bonding and 80211 drivers) Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/hw/nes/nes_nic.c7
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib_multicast.c9
2 files changed, 7 insertions, 9 deletions
diff --git a/drivers/infiniband/hw/nes/nes_nic.c b/drivers/infiniband/hw/nes/nes_nic.c
index 91fdde382e82..ce9ef6bc865c 100644
--- a/drivers/infiniband/hw/nes/nes_nic.c
+++ b/drivers/infiniband/hw/nes/nes_nic.c
@@ -876,7 +876,7 @@ static void nes_netdev_set_multicast_list(struct net_device *netdev)
876 if (!mc_all_on) { 876 if (!mc_all_on) {
877 char *addrs; 877 char *addrs;
878 int i; 878 int i;
879 struct dev_mc_list *mcaddr; 879 struct netdev_hw_addr *ha;
880 880
881 addrs = kmalloc(ETH_ALEN * mc_count, GFP_ATOMIC); 881 addrs = kmalloc(ETH_ALEN * mc_count, GFP_ATOMIC);
882 if (!addrs) { 882 if (!addrs) {
@@ -884,9 +884,8 @@ static void nes_netdev_set_multicast_list(struct net_device *netdev)
884 goto unlock; 884 goto unlock;
885 } 885 }
886 i = 0; 886 i = 0;
887 netdev_for_each_mc_addr(mcaddr, netdev) 887 netdev_for_each_mc_addr(ha, netdev)
888 memcpy(get_addr(addrs, i++), 888 memcpy(get_addr(addrs, i++), ha->addr, ETH_ALEN);
889 mcaddr->dmi_addr, ETH_ALEN);
890 889
891 perfect_filter_register_address = NES_IDX_PERFECT_FILTER_LOW + 890 perfect_filter_register_address = NES_IDX_PERFECT_FILTER_LOW +
892 pft_entries_preallocated * 0x8; 891 pft_entries_preallocated * 0x8;
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
index 19eba3c877cb..c8a0f7dab5b0 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
@@ -783,7 +783,7 @@ void ipoib_mcast_restart_task(struct work_struct *work)
783 struct ipoib_dev_priv *priv = 783 struct ipoib_dev_priv *priv =
784 container_of(work, struct ipoib_dev_priv, restart_task); 784 container_of(work, struct ipoib_dev_priv, restart_task);
785 struct net_device *dev = priv->dev; 785 struct net_device *dev = priv->dev;
786 struct dev_mc_list *mclist; 786 struct netdev_hw_addr *ha;
787 struct ipoib_mcast *mcast, *tmcast; 787 struct ipoib_mcast *mcast, *tmcast;
788 LIST_HEAD(remove_list); 788 LIST_HEAD(remove_list);
789 unsigned long flags; 789 unsigned long flags;
@@ -808,14 +808,13 @@ void ipoib_mcast_restart_task(struct work_struct *work)
808 clear_bit(IPOIB_MCAST_FLAG_FOUND, &mcast->flags); 808 clear_bit(IPOIB_MCAST_FLAG_FOUND, &mcast->flags);
809 809
810 /* 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 */
811 netdev_for_each_mc_addr(mclist, dev) { 811 netdev_for_each_mc_addr(ha, dev) {
812 union ib_gid mgid; 812 union ib_gid mgid;
813 813
814 if (!ipoib_mcast_addr_is_valid(mclist->dmi_addr, 814 if (!ipoib_mcast_addr_is_valid(ha->addr, dev->broadcast))
815 dev->broadcast))
816 continue; 815 continue;
817 816
818 memcpy(mgid.raw, mclist->dmi_addr + 4, sizeof mgid); 817 memcpy(mgid.raw, ha->addr + 4, sizeof mgid);
819 818
820 mcast = __ipoib_mcast_find(dev, &mgid); 819 mcast = __ipoib_mcast_find(dev, &mgid);
821 if (!mcast || test_bit(IPOIB_MCAST_FLAG_SENDONLY, &mcast->flags)) { 820 if (!mcast || test_bit(IPOIB_MCAST_FLAG_SENDONLY, &mcast->flags)) {