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>
This commit is contained in:
Edward Cree
2020-05-11 13:28:56 +01:00
committed by David S. Miller
parent be904b8552
commit 484a75b1db
2 changed files with 5 additions and 15 deletions

View File

@@ -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