diff options
| author | Breno Leitao <leitao@debian.org> | 2026-01-09 20:40:55 +0300 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-01-10 23:21:06 +0300 |
| commit | 983d4b8ec519bf10cb174b8aefd0257b46cf4396 (patch) | |
| tree | 3457bb6c39ad0c8eba16b8aa2f62843e656b26aa /drivers | |
| parent | 415a9d10d1802123249fffc3a553b8c813a2af88 (diff) | |
| download | linux-983d4b8ec519bf10cb174b8aefd0257b46cf4396.tar.xz | |
net: funeth: convert to use .get_rx_ring_count
Use the newly introduced .get_rx_ring_count ethtool ops callback instead
of handling ETHTOOL_GRXRINGS directly in .get_rxnfc().
Signed-off-by: Breno Leitao <leitao@debian.org>
Link: https://patch.msgid.link/20260109-grxring_big_v1-v1-4-a0f77f732006@debian.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/net/ethernet/fungible/funeth/funeth_ethtool.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/drivers/net/ethernet/fungible/funeth/funeth_ethtool.c b/drivers/net/ethernet/fungible/funeth/funeth_ethtool.c index 1966dba512f8..106adf7a870f 100644 --- a/drivers/net/ethernet/fungible/funeth/funeth_ethtool.c +++ b/drivers/net/ethernet/fungible/funeth/funeth_ethtool.c @@ -946,17 +946,9 @@ static void fun_get_fec_stats(struct net_device *netdev, #undef TX_STAT #undef FEC_STAT -static int fun_get_rxnfc(struct net_device *netdev, struct ethtool_rxnfc *cmd, - u32 *rule_locs) +static u32 fun_get_rx_ring_count(struct net_device *netdev) { - switch (cmd->cmd) { - case ETHTOOL_GRXRINGS: - cmd->data = netdev->real_num_rx_queues; - return 0; - default: - break; - } - return -EOPNOTSUPP; + return netdev->real_num_rx_queues; } static int fun_set_rxnfc(struct net_device *netdev, struct ethtool_rxnfc *info) @@ -1169,8 +1161,8 @@ static const struct ethtool_ops fun_ethtool_ops = { .get_sset_count = fun_get_sset_count, .get_strings = fun_get_strings, .get_ethtool_stats = fun_get_ethtool_stats, - .get_rxnfc = fun_get_rxnfc, .set_rxnfc = fun_set_rxnfc, + .get_rx_ring_count = fun_get_rx_ring_count, .get_rxfh_indir_size = fun_get_rxfh_indir_size, .get_rxfh_key_size = fun_get_rxfh_key_size, .get_rxfh = fun_get_rxfh, |
