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>
This commit is contained in:
committed by
David S. Miller
parent
dfcabb0788
commit
be904b8552
@@ -948,6 +948,13 @@ fail:
|
||||
|
||||
#endif /* CONFIG_SFC_MTD */
|
||||
|
||||
unsigned int siena_check_caps(const struct efx_nic *efx,
|
||||
u8 flag, u32 offset)
|
||||
{
|
||||
/* Siena did not support MC_CMD_GET_CAPABILITIES */
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* Revision-dependent attributes used by efx.c and nic.c
|
||||
|
||||
Reference in New Issue
Block a user