Signed-off-by: Richard Cochran <[email protected]>
---
config.c | 15 +--------------
config.h | 1 -
ds.h | 1 -
port.c | 4 ++--
ptp4l.c | 1 -
5 files changed, 3 insertions(+), 19 deletions(-)
diff --git a/config.c b/config.c
index f9d5777..d0451e3 100644
--- a/config.c
+++ b/config.c
@@ -93,6 +93,7 @@ struct config_item {
struct config_item config_tab[] = {
PORT_ITEM_INT("announceReceiptTimeout", 3, 2, UINT8_MAX),
GLOB_ITEM_INT("assume_two_step", 0, 0, 1),
+ PORT_ITEM_INT("boundary_clock_jbod", 0, 0, 1),
GLOB_ITEM_INT("check_fup_sync", 0, 0, 1),
PORT_ITEM_INT("delayAsymmetry", 0, INT_MIN, INT_MAX),
PORT_ITEM_INT("delay_filter_length", 10, 1, INT_MAX),
@@ -310,7 +311,6 @@ static enum parser_result parse_port_setting(struct config
*cfg,
struct interface *iface)
{
enum parser_result r;
- int val;
r = parse_pod_setting(option, value, &iface->pod);
if (r != NOT_PARSED)
@@ -356,12 +356,6 @@ static enum parser_result parse_port_setting(struct config
*cfg,
else
return BAD_VALUE;
- } else if (!strcmp(option, "boundary_clock_jbod")) {
- r = get_ranged_int(value, &val, 0, 1);
- if (r != PARSED_OK)
- return r;
- iface->boundary_clock_jbod = val;
-
} else
return parse_item(cfg, iface->name, option, value);
@@ -606,12 +600,6 @@ static enum parser_result parse_global_setting(const char
*option,
else
return BAD_VALUE;
- } else if (!strcmp(option, "boundary_clock_jbod")) {
- r = get_ranged_int(value, &val, 0, 1);
- if (r != PARSED_OK)
- return r;
- cfg->dds.boundary_clock_jbod = val;
-
} else
return parse_item(cfg, NULL, option, value);
@@ -799,7 +787,6 @@ void config_init_interface(struct interface *iface, struct
config *cfg)
sk_get_ts_info(iface->name, &iface->ts_info);
iface->delay_filter = cfg->dds.delay_filter;
- iface->boundary_clock_jbod = cfg->dds.boundary_clock_jbod;
}
int config_init(struct config *cfg)
diff --git a/config.h b/config.h
index df7b733..30a6803 100644
--- a/config.h
+++ b/config.h
@@ -41,7 +41,6 @@ struct interface {
struct sk_ts_info ts_info;
enum tsproc_mode tsproc_mode;
enum filter_type delay_filter;
- int boundary_clock_jbod;
};
#define CFG_IGNORE_DM (1 << 0)
diff --git a/ds.h b/ds.h
index 30d33d8..b252f39 100644
--- a/ds.h
+++ b/ds.h
@@ -61,7 +61,6 @@ struct default_ds {
struct clock_description clock_desc;
enum tsproc_mode tsproc_mode;
enum filter_type delay_filter;
- int boundary_clock_jbod;
};
struct dataset {
diff --git a/port.c b/port.c
index ba3108d..42714a6 100644
--- a/port.c
+++ b/port.c
@@ -2513,14 +2513,14 @@ struct port *port_open(int phc_index,
memset(p, 0, sizeof(*p));
p->phc_index = phc_index;
- p->jbod = interface->boundary_clock_jbod;
+ p->jbod = config_get_int(cfg, interface->name, "boundary_clock_jbod");
if (interface->transport == TRANS_UDS)
; /* UDS cannot have a PHC. */
else if (!interface->ts_info.valid)
pr_warning("port %d: get_ts_info not supported", number);
else if (phc_index >= 0 && phc_index != interface->ts_info.phc_index) {
- if (interface->boundary_clock_jbod) {
+ if (p->jbod) {
pr_warning("port %d: just a bunch of devices", number);
p->phc_index = interface->ts_info.phc_index;
} else {
diff --git a/ptp4l.c b/ptp4l.c
index c68fd60..0da5b1a 100644
--- a/ptp4l.c
+++ b/ptp4l.c
@@ -74,7 +74,6 @@ static struct config cfg_settings = {
},
.tsproc_mode = TSPROC_FILTER,
.delay_filter = FILTER_MOVING_MEDIAN,
- .boundary_clock_jbod = 0,
},
.timestamping = TS_HARDWARE,
--
2.1.4
------------------------------------------------------------------------------
_______________________________________________
Linuxptp-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel