diff options
author | Martin Habets <habetsm.xilinx@gmail.com> | 2022-05-09 16:32:58 +0100 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-05-10 15:38:15 -0700 |
commit | c8443b698238fd0cd525c48578e74f093e9f80aa (patch) | |
tree | 88cb0c9a20f676672aff17a64c6dd46fb2f77ae0 /drivers/net/ethernet/sfc/siena/efx_common.c | |
parent | 4d49e5cd4b095cd1fcf6b1abee0c1bac1b5fc722 (diff) |
sfc/siena: Rename functions in nic_common.h to avoid conflicts with sfc
For siena use efx_siena_ as the function prefix.
efx_nic_update_stats_atomic is only used in efx_common.c, so move
it there.
efx_nic_copy_stats is not used in Siena, so it is removed.
Signed-off-by: Martin Habets <habetsm.xilinx@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/sfc/siena/efx_common.c')
-rw-r--r-- | drivers/net/ethernet/sfc/siena/efx_common.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/net/ethernet/sfc/siena/efx_common.c b/drivers/net/ethernet/sfc/siena/efx_common.c index 3293221b9e9e..b44a7114e319 100644 --- a/drivers/net/ethernet/sfc/siena/efx_common.c +++ b/drivers/net/ethernet/sfc/siena/efx_common.c @@ -597,6 +597,14 @@ void efx_siena_stop_all(struct efx_nic *efx) efx_stop_datapath(efx); } +static size_t efx_siena_update_stats_atomic(struct efx_nic *efx, u64 *full_stats, + struct rtnl_link_stats64 *core_stats) +{ + if (efx->type->update_stats_atomic) + return efx->type->update_stats_atomic(efx, full_stats, core_stats); + return efx->type->update_stats(efx, full_stats, core_stats); +} + /* Context: process, dev_base_lock or RTNL held, non-blocking. */ void efx_siena_net_stats(struct net_device *net_dev, struct rtnl_link_stats64 *stats) @@ -604,7 +612,7 @@ void efx_siena_net_stats(struct net_device *net_dev, struct efx_nic *efx = netdev_priv(net_dev); spin_lock_bh(&efx->stats_lock); - efx_nic_update_stats_atomic(efx, NULL, stats); + efx_siena_update_stats_atomic(efx, NULL, stats); spin_unlock_bh(&efx->stats_lock); } |