|
@@ -106,7 +106,7 @@ static void __ipoib_mcast_schedule_join_thread(struct ipoib_dev_priv *priv,
|
|
|
queue_delayed_work(priv->wq, &priv->mcast_task, 0);
|
|
|
}
|
|
|
|
|
|
-void ipoib_mcast_free(struct ipoib_mcast *mcast)
|
|
|
+static void ipoib_mcast_free(struct ipoib_mcast *mcast)
|
|
|
{
|
|
|
struct net_device *dev = mcast->dev;
|
|
|
int tx_dropped = 0;
|
|
@@ -677,7 +677,7 @@ int ipoib_mcast_stop_thread(struct net_device *dev)
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
-int ipoib_mcast_leave(struct net_device *dev, struct ipoib_mcast *mcast)
|
|
|
+static int ipoib_mcast_leave(struct net_device *dev, struct ipoib_mcast *mcast)
|
|
|
{
|
|
|
struct ipoib_dev_priv *priv = netdev_priv(dev);
|
|
|
int ret = 0;
|
|
@@ -704,6 +704,16 @@ int ipoib_mcast_leave(struct net_device *dev, struct ipoib_mcast *mcast)
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
+void ipoib_mcast_remove_list(struct net_device *dev, struct list_head *remove_list)
|
|
|
+{
|
|
|
+ struct ipoib_mcast *mcast, *tmcast;
|
|
|
+
|
|
|
+ list_for_each_entry_safe(mcast, tmcast, remove_list, list) {
|
|
|
+ ipoib_mcast_leave(dev, mcast);
|
|
|
+ ipoib_mcast_free(mcast);
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
void ipoib_mcast_send(struct net_device *dev, u8 *daddr, struct sk_buff *skb)
|
|
|
{
|
|
|
struct ipoib_dev_priv *priv = netdev_priv(dev);
|
|
@@ -810,10 +820,7 @@ void ipoib_mcast_dev_flush(struct net_device *dev)
|
|
|
if (test_bit(IPOIB_MCAST_FLAG_BUSY, &mcast->flags))
|
|
|
wait_for_completion(&mcast->done);
|
|
|
|
|
|
- list_for_each_entry_safe(mcast, tmcast, &remove_list, list) {
|
|
|
- ipoib_mcast_leave(dev, mcast);
|
|
|
- ipoib_mcast_free(mcast);
|
|
|
- }
|
|
|
+ ipoib_mcast_remove_list(dev, &remove_list);
|
|
|
}
|
|
|
|
|
|
static int ipoib_mcast_addr_is_valid(const u8 *addr, const u8 *broadcast)
|
|
@@ -939,10 +946,7 @@ void ipoib_mcast_restart_task(struct work_struct *work)
|
|
|
if (test_bit(IPOIB_MCAST_FLAG_BUSY, &mcast->flags))
|
|
|
wait_for_completion(&mcast->done);
|
|
|
|
|
|
- list_for_each_entry_safe(mcast, tmcast, &remove_list, list) {
|
|
|
- ipoib_mcast_leave(mcast->dev, mcast);
|
|
|
- ipoib_mcast_free(mcast);
|
|
|
- }
|
|
|
+ ipoib_mcast_remove_list(mcast->dev, &remove_list);
|
|
|
|
|
|
/*
|
|
|
* Double check that we are still up
|