Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[pandora-kernel.git] / drivers / infiniband / ulp / ipoib / ipoib_multicast.c
index b166bb7..ecea4fe 100644 (file)
@@ -258,11 +258,15 @@ static int ipoib_mcast_join_finish(struct ipoib_mcast *mcast,
        netif_tx_lock_bh(dev);
        while (!skb_queue_empty(&mcast->pkt_queue)) {
                struct sk_buff *skb = skb_dequeue(&mcast->pkt_queue);
+               struct dst_entry *dst = skb_dst(skb);
+               struct neighbour *n = NULL;
+
                netif_tx_unlock_bh(dev);
 
                skb->dev = dev;
-
-               if (!skb_dst(skb) || !skb_dst(skb)->neighbour) {
+               if (dst)
+                       n = dst_get_neighbour(dst);
+               if (!dst || !n) {
                        /* put pseudoheader back on for next time */
                        skb_push(skb, sizeof (struct ipoib_pseudoheader));
                }
@@ -715,11 +719,13 @@ void ipoib_mcast_send(struct net_device *dev, void *mgid, struct sk_buff *skb)
 
 out:
        if (mcast && mcast->ah) {
-               if (skb_dst(skb)                &&
-                   skb_dst(skb)->neighbour &&
-                   !*to_ipoib_neigh(skb_dst(skb)->neighbour)) {
-                       struct ipoib_neigh *neigh = ipoib_neigh_alloc(skb_dst(skb)->neighbour,
-                                                                       skb->dev);
+               struct dst_entry *dst = skb_dst(skb);
+               struct neighbour *n = NULL;
+               if (dst)
+                       n = dst_get_neighbour(dst);
+               if (n && !*to_ipoib_neigh(n)) {
+                       struct ipoib_neigh *neigh = ipoib_neigh_alloc(n,
+                                                                     skb->dev);
 
                        if (neigh) {
                                kref_get(&mcast->ah->ref);
@@ -768,11 +774,8 @@ void ipoib_mcast_dev_flush(struct net_device *dev)
        }
 }
 
-static int ipoib_mcast_addr_is_valid(const u8 *addr, unsigned int addrlen,
-                                    const u8 *broadcast)
+static int ipoib_mcast_addr_is_valid(const u8 *addr, const u8 *broadcast)
 {
-       if (addrlen != INFINIBAND_ALEN)
-               return 0;
        /* reserved QPN, prefix, scope */
        if (memcmp(addr, broadcast, 6))
                return 0;
@@ -787,7 +790,7 @@ void ipoib_mcast_restart_task(struct work_struct *work)
        struct ipoib_dev_priv *priv =
                container_of(work, struct ipoib_dev_priv, restart_task);
        struct net_device *dev = priv->dev;
-       struct dev_mc_list *mclist;
+       struct netdev_hw_addr *ha;
        struct ipoib_mcast *mcast, *tmcast;
        LIST_HEAD(remove_list);
        unsigned long flags;
@@ -812,15 +815,13 @@ void ipoib_mcast_restart_task(struct work_struct *work)
                clear_bit(IPOIB_MCAST_FLAG_FOUND, &mcast->flags);
 
        /* Mark all of the entries that are found or don't exist */
-       netdev_for_each_mc_addr(mclist, dev) {
+       netdev_for_each_mc_addr(ha, dev) {
                union ib_gid mgid;
 
-               if (!ipoib_mcast_addr_is_valid(mclist->dmi_addr,
-                                              mclist->dmi_addrlen,
-                                              dev->broadcast))
+               if (!ipoib_mcast_addr_is_valid(ha->addr, dev->broadcast))
                        continue;
 
-               memcpy(mgid.raw, mclist->dmi_addr + 4, sizeof mgid);
+               memcpy(mgid.raw, ha->addr + 4, sizeof mgid);
 
                mcast = __ipoib_mcast_find(dev, &mgid);
                if (!mcast || test_bit(IPOIB_MCAST_FLAG_SENDONLY, &mcast->flags)) {