aboutsummaryrefslogtreecommitdiffstats
path: root/include/rdma/ib_addr.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/rdma/ib_addr.h')
-rw-r--r--include/rdma/ib_addr.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/rdma/ib_addr.h b/include/rdma/ib_addr.h
index ae8c68f30f1b..639a4491fc0d 100644
--- a/include/rdma/ib_addr.h
+++ b/include/rdma/ib_addr.h
@@ -218,8 +218,12 @@ static inline int iboe_get_rate(struct net_device *dev)
218{ 218{
219 struct ethtool_cmd cmd; 219 struct ethtool_cmd cmd;
220 u32 speed; 220 u32 speed;
221 int err;
221 222
222 if (dev_ethtool_get_settings(dev, &cmd)) 223 rtnl_lock();
224 err = __ethtool_get_settings(dev, &cmd);
225 rtnl_unlock();
226 if (err)
223 return IB_RATE_PORT_CURRENT; 227 return IB_RATE_PORT_CURRENT;
224 228
225 speed = ethtool_cmd_speed(&cmd); 229 speed = ethtool_cmd_speed(&cmd);