aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c
diff options
context:
space:
mode:
authorMatthias Brugger <matthias.bgg@gmail.com>2018-03-15 17:54:20 +0100
committerDavid S. Miller <davem@davemloft.net>2018-03-17 19:48:26 -0400
commitd61d263c8d82db7c4404a29ebc29674b1c0c05c9 (patch)
treeb47f21dd62dd518a1bd432bf2a8d726b56f91f4d /drivers/net/ethernet/hisilicon/hns/hns_ethtool.c
parentmlxsw: spectrum_buffers: Set a minimum quota for CPU port traffic (diff)
downloadlinux-dev-d61d263c8d82db7c4404a29ebc29674b1c0c05c9.tar.xz
linux-dev-d61d263c8d82db7c4404a29ebc29674b1c0c05c9.zip
net: hns: Fix ethtool private flags
The driver implementation returns support for private flags, while no private flags are present. When asked for the number of private flags it returns the number of statistic flag names. Fix this by returning EOPNOTSUPP for not implemented ethtool flags. Signed-off-by: Matthias Brugger <mbrugger@suse.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--drivers/net/ethernet/hisilicon/hns/hns_ethtool.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c b/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c
index 7ea7f8a4aa2a..2e14a3ae1d8b 100644
--- a/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c
+++ b/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c
@@ -993,8 +993,10 @@ int hns_get_sset_count(struct net_device *netdev, int stringset)
cnt--;
return cnt;
- } else {
+ } else if (stringset == ETH_SS_STATS) {
return (HNS_NET_STATS_CNT + ops->get_sset_count(h, stringset));
+ } else {
+ return -EOPNOTSUPP;
}
}