summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/sfc/net_driver.h
diff options
context:
space:
mode:
authorJonathan Cooper <jonathan.s.cooper@amd.com>2022-06-28 14:59:45 +0100
committerDavid S. Miller <davem@davemloft.net>2022-06-29 13:40:47 +0100
commit8cb03f4e084e8472d5fec77c01ee70eae8fa8b22 (patch)
treea85a335254c8fab2730ac8273eed41f4826f7ad2 /drivers/net/ethernet/sfc/net_driver.h
parentb3fd0a86dad2f574b5196829d5881a940c0d0cb1 (diff)
sfc: Encapsulate access to netdev_priv()
Once we separate struct efx_nic memory from net_device memory the existing usage will have to change. Apart from the new function efx_netdev_priv() accesses have been changed using: sed -i 's/netdev_priv/efx_netdev_priv/' Signed-off-by: Jonathan Cooper <jonathan.s.cooper@amd.com> Co-developed-by: Martin Habets <habetsm.xilinx@gmail.com> Signed-off-by: Martin Habets <habetsm.xilinx@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/sfc/net_driver.h')
-rw-r--r--drivers/net/ethernet/sfc/net_driver.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/ethernet/sfc/net_driver.h b/drivers/net/ethernet/sfc/net_driver.h
index 546552d5d86f..df93ffd7092a 100644
--- a/drivers/net/ethernet/sfc/net_driver.h
+++ b/drivers/net/ethernet/sfc/net_driver.h
@@ -1166,6 +1166,11 @@ struct efx_nic {
atomic_t n_rx_noskb_drops;
};
+static inline struct efx_nic *efx_netdev_priv(struct net_device *dev)
+{
+ return netdev_priv(dev);
+}
+
static inline int efx_dev_registered(struct efx_nic *efx)
{
return efx->net_dev->reg_state == NETREG_REGISTERED;