diff options
Diffstat (limited to 'drivers/infiniband/ulp/ipoib/ipoib_multicast.c')
-rw-r--r-- | drivers/infiniband/ulp/ipoib/ipoib_multicast.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c index f46932dc81c9..70208c3d21e2 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c | |||
@@ -258,13 +258,12 @@ static int ipoib_mcast_join_finish(struct ipoib_mcast *mcast, | |||
258 | .traffic_class = mcast->mcmember.traffic_class | 258 | .traffic_class = mcast->mcmember.traffic_class |
259 | } | 259 | } |
260 | }; | 260 | }; |
261 | int path_rate = ib_sa_rate_enum_to_int(mcast->mcmember.rate); | ||
261 | 262 | ||
262 | av.grh.dgid = mcast->mcmember.mgid; | 263 | av.grh.dgid = mcast->mcmember.mgid; |
263 | 264 | ||
264 | if (ib_sa_rate_enum_to_int(mcast->mcmember.rate) > 0) | 265 | if (path_rate > 0 && priv->local_rate > path_rate) |
265 | av.static_rate = (2 * priv->local_rate - | 266 | av.static_rate = (priv->local_rate - 1) / path_rate; |
266 | ib_sa_rate_enum_to_int(mcast->mcmember.rate) - 1) / | ||
267 | (priv->local_rate ? priv->local_rate : 1); | ||
268 | 267 | ||
269 | ipoib_dbg_mcast(priv, "static_rate %d for local port %dX, mcmember %dX\n", | 268 | ipoib_dbg_mcast(priv, "static_rate %d for local port %dX, mcmember %dX\n", |
270 | av.static_rate, priv->local_rate, | 269 | av.static_rate, priv->local_rate, |