diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/infiniband/ulp/ipoib/ipoib_main.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c index a082466f4a83..886a08cc7d4a 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c | |||
@@ -680,12 +680,7 @@ static int ipoib_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
680 | 680 | ||
681 | neigh = *to_ipoib_neigh(skb->dst->neighbour); | 681 | neigh = *to_ipoib_neigh(skb->dst->neighbour); |
682 | 682 | ||
683 | if (ipoib_cm_get(neigh)) { | 683 | if (neigh->ah) |
684 | if (ipoib_cm_up(neigh)) { | ||
685 | ipoib_cm_send(dev, skb, ipoib_cm_get(neigh)); | ||
686 | goto out; | ||
687 | } | ||
688 | } else if (neigh->ah) { | ||
689 | if (unlikely((memcmp(&neigh->dgid.raw, | 684 | if (unlikely((memcmp(&neigh->dgid.raw, |
690 | skb->dst->neighbour->ha + 4, | 685 | skb->dst->neighbour->ha + 4, |
691 | sizeof(union ib_gid))) || | 686 | sizeof(union ib_gid))) || |
@@ -706,6 +701,12 @@ static int ipoib_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
706 | goto out; | 701 | goto out; |
707 | } | 702 | } |
708 | 703 | ||
704 | if (ipoib_cm_get(neigh)) { | ||
705 | if (ipoib_cm_up(neigh)) { | ||
706 | ipoib_cm_send(dev, skb, ipoib_cm_get(neigh)); | ||
707 | goto out; | ||
708 | } | ||
709 | } else if (neigh->ah) { | ||
709 | ipoib_send(dev, skb, neigh->ah, IPOIB_QPN(skb->dst->neighbour->ha)); | 710 | ipoib_send(dev, skb, neigh->ah, IPOIB_QPN(skb->dst->neighbour->ha)); |
710 | goto out; | 711 | goto out; |
711 | } | 712 | } |