diff options
author | Edward Cree <ecree@solarflare.com> | 2020-05-11 13:28:56 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-05-11 13:31:49 -0700 |
commit | 484a75b1dbc492cca4893718e70daccc05c2ce0b (patch) | |
tree | 79b7d7124ad1070ce0038a6d4e00377493bdb6c1 /drivers/net/ethernet/sfc/ptp.c | |
parent | be904b855200ef4672c765918b31338b59c4847c (diff) |
sfc: use efx_has_cap for capability checks outside of NIC-specific code
Removes some efx_ef10_nic_data references from common code.
Signed-off-by: Edward Cree <ecree@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/sfc/ptp.c')
-rw-r--r-- | drivers/net/ethernet/sfc/ptp.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/net/ethernet/sfc/ptp.c b/drivers/net/ethernet/sfc/ptp.c index 59b4f16896a8..04c7283d205e 100644 --- a/drivers/net/ethernet/sfc/ptp.c +++ b/drivers/net/ethernet/sfc/ptp.c @@ -352,12 +352,7 @@ static int efx_phc_enable(struct ptp_clock_info *ptp, bool efx_ptp_use_mac_tx_timestamps(struct efx_nic *efx) { - struct efx_ef10_nic_data *nic_data = efx->nic_data; - - return ((efx_nic_rev(efx) >= EFX_REV_HUNT_A0) && - (nic_data->datapath_caps2 & - (1 << MC_CMD_GET_CAPABILITIES_V2_OUT_TX_MAC_TIMESTAMPING_LBN) - )); + return efx_has_cap(efx, TX_MAC_TIMESTAMPING, FLAGS2); } /* PTP 'extra' channel is still a traffic channel, but we only create TX queues |