diff options
author | Jakub Kicinski <jakub.kicinski@netronome.com> | 2018-01-15 11:47:53 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-01-16 14:55:07 -0500 |
commit | 0d9c9f0f40ca262b67fc06a702b85f3976f5e1a1 (patch) | |
tree | 4670585b5e3b01837e3b8f21ac498c4c4f39325c /drivers | |
parent | a5b1379afbfabf91e3a689e82ac619a7157336b3 (diff) | |
download | linux-0d9c9f0f40ca262b67fc06a702b85f3976f5e1a1.tar.bz2 |
nfp: use the correct index for link speed table
sts variable is holding link speed as well as state. We should
be using ls to index into ls_to_ethtool.
Fixes: 265aeb511bd5 ("nfp: add support for .get_link_ksettings()")
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c b/drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c index 2801ecd09eab..6c02b2d6ba06 100644 --- a/drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c +++ b/drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c @@ -333,7 +333,7 @@ nfp_net_get_link_ksettings(struct net_device *netdev, ls >= ARRAY_SIZE(ls_to_ethtool)) return 0; - cmd->base.speed = ls_to_ethtool[sts]; + cmd->base.speed = ls_to_ethtool[ls]; cmd->base.duplex = DUPLEX_FULL; return 0; |