diff options
author | Jakub Kicinski <jakub.kicinski@netronome.com> | 2019-02-10 19:35:27 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-02-11 20:39:55 -0800 |
commit | 3ceb745baa4c90eb34dee983053fcbd2d8825a20 (patch) | |
tree | 9dd8f0c91c2b0b05bd9310a0ab60401c611650fd /net/core | |
parent | b904aada8033749558e3aaeb574a2200bf0458f0 (diff) |
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: ddb6e99e2db1 ("ethtool: add compat for devlink info")
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/devlink.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/devlink.c b/net/core/devlink.c index 0de1edb65c24..61fab0dc0166 100644 --- a/net/core/devlink.c +++ b/net/core/devlink.c @@ -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); |