diff options
author | Tom Zhao <tzhao@solarflare.com> | 2020-05-11 13:28:40 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-05-11 13:31:49 -0700 |
commit | be904b855200ef4672c765918b31338b59c4847c (patch) | |
tree | 850e5e79ba79e5281b07d8f52432119f25cb44fa /drivers/net/ethernet/sfc/net_driver.h | |
parent | dfcabb078847479cc2874c11af3f6cb3b79ddd03 (diff) | |
download | lwn-be904b855200ef4672c765918b31338b59c4847c.tar.gz lwn-be904b855200ef4672c765918b31338b59c4847c.zip |
sfc: make capability checking a nic_type function
Various MCDI functions (especially in filter handling) need to check the
datapath caps, but those live in nic_data (since they don't exist on
Siena). Decouple from ef10-specific data structures by adding check_caps
to the nic_type, to allow using these functions from non-ef10 drivers.
Also add a convenience macro efx_has_cap() to reduce the amount of
boilerplate involved in calling it.
Signed-off-by: Edward Cree <ecree@solarflare.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.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/sfc/net_driver.h b/drivers/net/ethernet/sfc/net_driver.h index d43f22c8f31c..bdeea48ff938 100644 --- a/drivers/net/ethernet/sfc/net_driver.h +++ b/drivers/net/ethernet/sfc/net_driver.h @@ -1354,6 +1354,9 @@ struct efx_nic_type { void (*get_wol)(struct efx_nic *efx, struct ethtool_wolinfo *wol); int (*set_wol)(struct efx_nic *efx, u32 type); void (*resume_wol)(struct efx_nic *efx); + unsigned int (*check_caps)(const struct efx_nic *efx, + u8 flag, + u32 offset); int (*test_chip)(struct efx_nic *efx, struct efx_self_tests *tests); int (*test_nvram)(struct efx_nic *efx); void (*mcdi_request)(struct efx_nic *efx, |