Signed-off-by: Richard Cochran <richardcoch...@gmail.com>
---
 clock.c  | 2 +-
 config.c | 7 +------
 ds.h     | 1 -
 ptp4l.c  | 1 -
 4 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/clock.c b/clock.c
index ee20a3c..ab048f5 100644
--- a/clock.c
+++ b/clock.c
@@ -830,7 +830,7 @@ struct clock *clock_create(struct config *config, int 
phc_index,
        c->grand_master_capable = config_get_int(config, NULL, "gmCapable");
        c->kernel_leap = config_get_int(config, NULL, "kernel_leap");
        c->utc_offset = CURRENT_UTC_OFFSET;
-       c->time_source = dds->time_source;
+       c->time_source = config_get_int(config, NULL, "timeSource");
        c->desc = dds->clock_desc;
 
        if (c->free_running) {
diff --git a/config.c b/config.c
index 1007a27..71d96e5 100644
--- a/config.c
+++ b/config.c
@@ -127,6 +127,7 @@ struct config_item config_tab[] = {
        GLOB_ITEM_DBL("step_threshold", 0.0, 0.0, DBL_MAX),
        GLOB_ITEM_INT("summary_interval", 0, INT_MIN, INT_MAX),
        PORT_ITEM_INT("syncReceiptTimeout", 0, 0, UINT8_MAX),
+       GLOB_ITEM_INT("timeSource", INTERNAL_OSCILLATOR, 0x10, 0xfe),
        PORT_ITEM_INT("transportSpecific", 0, 0, 0x0F),
        GLOB_ITEM_INT("tx_timestamp_timeout", 1, 1, INT_MAX),
        PORT_ITEM_INT("udp_ttl", 1, 1, 255),
@@ -549,12 +550,6 @@ static enum parser_result parse_global_setting(const char 
*option,
                for (i = 0; i < OUI_LEN; i++)
                        cfg->dds.clock_desc.manufacturerIdentity[i] = oui[i];
 
-       } else if (!strcmp(option, "timeSource")) {
-               r = get_ranged_int(value, &val, 0x10, 0xfe);
-               if (r != PARSED_OK)
-                       return r;
-               cfg->dds.time_source = val;
-
        } else if (!strcmp(option, "tsproc_mode")) {
                if (!strcasecmp("filter", value))
                        cfg->dds.tsproc_mode = TSPROC_FILTER;
diff --git a/ds.h b/ds.h
index 505dc76..f32a26c 100644
--- a/ds.h
+++ b/ds.h
@@ -52,7 +52,6 @@ struct clock_description {
 
 struct default_ds {
        struct defaultDS dds;
-       int time_source;
        struct clock_description clock_desc;
        enum tsproc_mode tsproc_mode;
        enum filter_type delay_filter;
diff --git a/ptp4l.c b/ptp4l.c
index fcddd99..461f39d 100644
--- a/ptp4l.c
+++ b/ptp4l.c
@@ -52,7 +52,6 @@ static struct config cfg_settings = {
                        .priority2 = 128,
                        .domainNumber = 0,
                },
-               .time_source = INTERNAL_OSCILLATOR,
                .clock_desc = {
                        .productDescription = {
                                .max_symbols = 64,
-- 
2.1.4


------------------------------------------------------------------------------
_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to