diff options
author | Alex Maftei (amaftei) <amaftei@solarflare.com> | 2020-01-10 13:27:17 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-01-10 11:24:37 -0800 |
commit | 190c736a8088b6dbf62b78192e6a2401eb58177b (patch) | |
tree | 4b922559f23895ad45b62f462a722f96f705b301 /drivers/net/ethernet/sfc/efx_common.c | |
parent | 3d95b884392f0a050fb9ca3c535981a1a5334616 (diff) |
sfc: move various functions
Signed-off-by: Alexandru-Mihai Maftei <amaftei@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/sfc/efx_common.c')
-rw-r--r-- | drivers/net/ethernet/sfc/efx_common.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/ethernet/sfc/efx_common.c b/drivers/net/ethernet/sfc/efx_common.c index 33b523b6d0a8..0875507efd0a 100644 --- a/drivers/net/ethernet/sfc/efx_common.c +++ b/drivers/net/ethernet/sfc/efx_common.c @@ -454,6 +454,16 @@ void efx_stop_all(struct efx_nic *efx) efx_stop_datapath(efx); } +/* Context: process, dev_base_lock or RTNL held, non-blocking. */ +void efx_net_stats(struct net_device *net_dev, struct rtnl_link_stats64 *stats) +{ + struct efx_nic *efx = netdev_priv(net_dev); + + spin_lock_bh(&efx->stats_lock); + efx->type->update_stats(efx, NULL, stats); + spin_unlock_bh(&efx->stats_lock); +} + /* Push loopback/power/transmit disable settings to the PHY, and reconfigure * the MAC appropriately. All other PHY configuration changes are pushed * through phy_op->set_settings(), and pushed asynchronously to the MAC |