nfp: use the correct index for link speed table
authorJakub Kicinski <jakub.kicinski@netronome.com>
Mon, 15 Jan 2018 19:47:53 +0000 (11:47 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 31 Jan 2018 13:03:48 +0000 (14:03 +0100)
commita8c21ba721d4bfc614ecb46f9507cc042b6a6d6b
treeccf887b2aa4b4cac521a90774c4c70c0ed890e5c
parent4f97adffa33f41f5b9d4b9b01291f12bb74afe22
nfp: use the correct index for link speed table

[ Upstream commit 0d9c9f0f40ca262b67fc06a702b85f3976f5e1a1 ]

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c