Convert call sites to the proper method for testing time stamping modes.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
master
Richard Cochran 2020-02-09 16:07:20 -08:00
parent 720c9fa08d
commit 21141a44e6
2 changed files with 2 additions and 2 deletions

View File

@ -957,7 +957,7 @@ struct clock *clock_create(enum clock_type type, struct config *config,
interface_ensure_tslabel(iface); interface_ensure_tslabel(iface);
interface_get_tsinfo(iface); interface_get_tsinfo(iface);
if (interface_tsinfo_valid(iface) && if (interface_tsinfo_valid(iface) &&
((iface->ts_info.so_timestamping & required_modes) != required_modes)) { !interface_tsmodes_supported(iface, required_modes)) {
pr_err("interface '%s' does not support requested timestamping mode", pr_err("interface '%s' does not support requested timestamping mode",
interface_name(iface)); interface_name(iface));
return NULL; return NULL;

2
port.c
View File

@ -2514,7 +2514,7 @@ void port_link_status(void *ctx, int linkup, int ts_index)
if (interface_tsinfo_valid(p->iface) && if (interface_tsinfo_valid(p->iface) &&
interface_phc_index(p->iface) >= 0) { interface_phc_index(p->iface) >= 0) {
required_modes = clock_required_modes(p->clock); required_modes = clock_required_modes(p->clock);
if ((p->iface->ts_info.so_timestamping & required_modes) != required_modes) { if (!interface_tsmodes_supported(p->iface, required_modes)) {
pr_err("interface '%s' does not support requested " pr_err("interface '%s' does not support requested "
"timestamping mode, set link status down by force.", "timestamping mode, set link status down by force.",
interface_label(p->iface)); interface_label(p->iface));