Skip to content

Commit df8b4ec

Browse files
Ben Hutchingsdavem330
authored andcommitted
qeth: Convert ethtool get_stats_count() ops to get_sset_count()
This string query operation was supposed to be replaced by the generic get_sset_count() starting in 2007. Convert qeth's implementation. Signed-off-by: Ben Hutchings <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 374576a commit df8b4ec

File tree

4 files changed

+12
-7
lines changed

4 files changed

+12
-7
lines changed

drivers/s390/net/qeth_core.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -849,7 +849,7 @@ int qeth_do_send_packet_fast(struct qeth_card *, struct qeth_qdio_out_q *,
849849
struct sk_buff *, struct qeth_hdr *, int, int, int);
850850
int qeth_do_send_packet(struct qeth_card *, struct qeth_qdio_out_q *,
851851
struct sk_buff *, struct qeth_hdr *, int);
852-
int qeth_core_get_stats_count(struct net_device *);
852+
int qeth_core_get_sset_count(struct net_device *, int);
853853
void qeth_core_get_ethtool_stats(struct net_device *,
854854
struct ethtool_stats *, u64 *);
855855
void qeth_core_get_strings(struct net_device *, u32, u8 *);

drivers/s390/net/qeth_core_main.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4305,11 +4305,16 @@ static struct {
43054305
{"tx csum"},
43064306
};
43074307

4308-
int qeth_core_get_stats_count(struct net_device *dev)
4308+
int qeth_core_get_sset_count(struct net_device *dev, int stringset)
43094309
{
4310-
return (sizeof(qeth_ethtool_stats_keys) / ETH_GSTRING_LEN);
4310+
switch (stringset) {
4311+
case ETH_SS_STATS:
4312+
return (sizeof(qeth_ethtool_stats_keys) / ETH_GSTRING_LEN);
4313+
default:
4314+
return -EINVAL;
4315+
}
43114316
}
4312-
EXPORT_SYMBOL_GPL(qeth_core_get_stats_count);
4317+
EXPORT_SYMBOL_GPL(qeth_core_get_sset_count);
43134318

43144319
void qeth_core_get_ethtool_stats(struct net_device *dev,
43154320
struct ethtool_stats *stats, u64 *data)

drivers/s390/net/qeth_l2_main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -866,15 +866,15 @@ static const struct ethtool_ops qeth_l2_ethtool_ops = {
866866
.get_link = ethtool_op_get_link,
867867
.get_strings = qeth_core_get_strings,
868868
.get_ethtool_stats = qeth_core_get_ethtool_stats,
869-
.get_stats_count = qeth_core_get_stats_count,
869+
.get_sset_count = qeth_core_get_sset_count,
870870
.get_drvinfo = qeth_core_get_drvinfo,
871871
.get_settings = qeth_core_ethtool_get_settings,
872872
};
873873

874874
static const struct ethtool_ops qeth_l2_osn_ops = {
875875
.get_strings = qeth_core_get_strings,
876876
.get_ethtool_stats = qeth_core_get_ethtool_stats,
877-
.get_stats_count = qeth_core_get_stats_count,
877+
.get_sset_count = qeth_core_get_sset_count,
878878
.get_drvinfo = qeth_core_get_drvinfo,
879879
};
880880

drivers/s390/net/qeth_l3_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2957,7 +2957,7 @@ static const struct ethtool_ops qeth_l3_ethtool_ops = {
29572957
.set_tso = qeth_l3_ethtool_set_tso,
29582958
.get_strings = qeth_core_get_strings,
29592959
.get_ethtool_stats = qeth_core_get_ethtool_stats,
2960-
.get_stats_count = qeth_core_get_stats_count,
2960+
.get_sset_count = qeth_core_get_sset_count,
29612961
.get_drvinfo = qeth_core_get_drvinfo,
29622962
.get_settings = qeth_core_ethtool_get_settings,
29632963
};

0 commit comments

Comments
 (0)