Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 633fbb06 authored by Kamal Heib's avatar Kamal Heib Committed by Jason Gunthorpe
Browse files

RDMA/ipoib: implement ethtool .get_link() callback



Add support for reporting link state for ipoib net devices.

$ ip l set dev mlx4_ib0 up
$ ethtool mlx4_ib0 | grep Link
	Link detected: yes
$ ip l set dev mlx4_ib0 down
$ ethtool mlx4_ib0 | grep Link
	Link detected: no

Signed-off-by: default avatarKamal Heib <kamalheib1@gmail.com>
Reviewed-by: default avatarLeon Romanovsky <leonro@mellanox.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
parent 97545b10
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -222,6 +222,7 @@ static const struct ethtool_ops ipoib_ethtool_ops = {
	.get_strings		= ipoib_get_strings,
	.get_ethtool_stats	= ipoib_get_ethtool_stats,
	.get_sset_count		= ipoib_get_sset_count,
	.get_link		= ethtool_op_get_link,
};

void ipoib_set_ethtool_ops(struct net_device *dev)