diff options
Diffstat (limited to 'net/core/ethtool.c')
-rw-r--r-- | net/core/ethtool.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/net/core/ethtool.c b/net/core/ethtool.c index 1d00b8922902..b495ab1797fa 100644 --- a/net/core/ethtool.c +++ b/net/core/ethtool.c | |||
@@ -98,7 +98,6 @@ static const char netdev_features_strings[NETDEV_FEATURE_COUNT][ETH_GSTRING_LEN] | |||
98 | [NETIF_F_RXALL_BIT] = "rx-all", | 98 | [NETIF_F_RXALL_BIT] = "rx-all", |
99 | [NETIF_F_HW_L2FW_DOFFLOAD_BIT] = "l2-fwd-offload", | 99 | [NETIF_F_HW_L2FW_DOFFLOAD_BIT] = "l2-fwd-offload", |
100 | [NETIF_F_BUSY_POLL_BIT] = "busy-poll", | 100 | [NETIF_F_BUSY_POLL_BIT] = "busy-poll", |
101 | [NETIF_F_HW_SWITCH_OFFLOAD_BIT] = "hw-switch-offload", | ||
102 | }; | 101 | }; |
103 | 102 | ||
104 | static const char | 103 | static const char |
@@ -107,6 +106,13 @@ rss_hash_func_strings[ETH_RSS_HASH_FUNCS_COUNT][ETH_GSTRING_LEN] = { | |||
107 | [ETH_RSS_HASH_XOR_BIT] = "xor", | 106 | [ETH_RSS_HASH_XOR_BIT] = "xor", |
108 | }; | 107 | }; |
109 | 108 | ||
109 | static const char | ||
110 | tunable_strings[__ETHTOOL_TUNABLE_COUNT][ETH_GSTRING_LEN] = { | ||
111 | [ETHTOOL_ID_UNSPEC] = "Unspec", | ||
112 | [ETHTOOL_RX_COPYBREAK] = "rx-copybreak", | ||
113 | [ETHTOOL_TX_COPYBREAK] = "tx-copybreak", | ||
114 | }; | ||
115 | |||
110 | static int ethtool_get_features(struct net_device *dev, void __user *useraddr) | 116 | static int ethtool_get_features(struct net_device *dev, void __user *useraddr) |
111 | { | 117 | { |
112 | struct ethtool_gfeatures cmd = { | 118 | struct ethtool_gfeatures cmd = { |
@@ -195,6 +201,9 @@ static int __ethtool_get_sset_count(struct net_device *dev, int sset) | |||
195 | if (sset == ETH_SS_RSS_HASH_FUNCS) | 201 | if (sset == ETH_SS_RSS_HASH_FUNCS) |
196 | return ARRAY_SIZE(rss_hash_func_strings); | 202 | return ARRAY_SIZE(rss_hash_func_strings); |
197 | 203 | ||
204 | if (sset == ETH_SS_TUNABLES) | ||
205 | return ARRAY_SIZE(tunable_strings); | ||
206 | |||
198 | if (ops->get_sset_count && ops->get_strings) | 207 | if (ops->get_sset_count && ops->get_strings) |
199 | return ops->get_sset_count(dev, sset); | 208 | return ops->get_sset_count(dev, sset); |
200 | else | 209 | else |
@@ -212,6 +221,8 @@ static void __ethtool_get_strings(struct net_device *dev, | |||
212 | else if (stringset == ETH_SS_RSS_HASH_FUNCS) | 221 | else if (stringset == ETH_SS_RSS_HASH_FUNCS) |
213 | memcpy(data, rss_hash_func_strings, | 222 | memcpy(data, rss_hash_func_strings, |
214 | sizeof(rss_hash_func_strings)); | 223 | sizeof(rss_hash_func_strings)); |
224 | else if (stringset == ETH_SS_TUNABLES) | ||
225 | memcpy(data, tunable_strings, sizeof(tunable_strings)); | ||
215 | else | 226 | else |
216 | /* ops->get_strings is valid because checked earlier */ | 227 | /* ops->get_strings is valid because checked earlier */ |
217 | ops->get_strings(dev, stringset, data); | 228 | ops->get_strings(dev, stringset, data); |