Commit 4017d929 authored by Amit Cohen's avatar Amit Cohen Committed by David S. Miller
Browse files

mlxsw: spectrum_ptp: Rename mlxsw_sp_ptp_get_message_types()



Spectrum-1 and Spectrum-2 differ in their time stamping capabilities.
The former can be configured to time stamp only a subset of received PTP
events (e.g., only Sync), whereas the latter will time stamp all PTP
events or none.

In preparation for Spectrum-2 PTP support, rename the function that
parses the hardware time stamping configuration upon %SIOCSHWTSTAMP to
be Spectrum-1 specific.

Signed-off-by: default avatarAmit Cohen <amcohen@nvidia.com>
Reviewed-by: default avatarPetr Machata <petrm@nvidia.com>
Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9bfe3c16
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -918,7 +918,8 @@ int mlxsw_sp1_ptp_hwtstamp_get(struct mlxsw_sp_port *mlxsw_sp_port,
	return 0;
}

static int mlxsw_sp_ptp_get_message_types(const struct hwtstamp_config *config,
static int
mlxsw_sp1_ptp_get_message_types(const struct hwtstamp_config *config,
				u16 *p_ing_types, u16 *p_egr_types,
				enum hwtstamp_rx_filters *p_rx_filter)
{
@@ -1081,7 +1082,7 @@ int mlxsw_sp1_ptp_hwtstamp_set(struct mlxsw_sp_port *mlxsw_sp_port,
	u16 egr_types;
	int err;

	err = mlxsw_sp_ptp_get_message_types(config, &ing_types, &egr_types,
	err = mlxsw_sp1_ptp_get_message_types(config, &ing_types, &egr_types,
					      &rx_filter);
	if (err)
		return err;