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

Commit 3ceb745b authored by Jakub Kicinski's avatar Jakub Kicinski Committed by David S. Miller
Browse files

devlink: fix condition for compat device info



We need the port to be both ethernet and have the rigth netdev,
not one or the other.

Fixes: ddb6e99e ("ethtool: add compat for devlink info")
Signed-off-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b904aada
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -6393,7 +6393,7 @@ void devlink_compat_running_version(struct net_device *dev,
	list_for_each_entry(devlink, &devlink_list, list) {
		mutex_lock(&devlink->lock);
		list_for_each_entry(devlink_port, &devlink->port_list, list) {
			if (devlink_port->type == DEVLINK_PORT_TYPE_ETH ||
			if (devlink_port->type == DEVLINK_PORT_TYPE_ETH &&
			    devlink_port->type_dev == dev) {
				__devlink_compat_running_version(devlink,
								 buf, len);