Signed-off-by: Richard Cochran <[email protected]>
---
config.c | 7 +------
ptp4l.c | 3 ++-
2 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/config.c b/config.c
index 683eee5..516ce7a 100644
--- a/config.c
+++ b/config.c
@@ -95,6 +95,7 @@ struct config_item config_tab[] = {
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),
+ GLOB_ITEM_INT("clockClass", 248, 0, UINT8_MAX),
PORT_ITEM_INT("delayAsymmetry", 0, INT_MIN, INT_MAX),
PORT_ITEM_INT("delay_filter_length", 10, 1, INT_MAX),
PORT_ITEM_INT("egressLatency", 0, INT_MIN, INT_MAX),
@@ -404,12 +405,6 @@ static enum parser_result parse_global_setting(const char
*option,
return r;
dds->domainNumber = uval;
- } else if (!strcmp(option, "clockClass")) {
- r = get_ranged_uint(value, &uval, 0, UINT8_MAX);
- if (r != PARSED_OK)
- return r;
- dds->clockQuality.clockClass = uval;
-
} else if (!strcmp(option, "clockAccuracy")) {
r = get_ranged_uint(value, &uval, 0, UINT8_MAX);
if (r != PARSED_OK)
diff --git a/ptp4l.c b/ptp4l.c
index de3af43..8ec52cc 100644
--- a/ptp4l.c
+++ b/ptp4l.c
@@ -44,7 +44,6 @@ static struct config cfg_settings = {
.dds = {
.dds = {
- .clockQuality.clockClass = 248,
.clockQuality.clockAccuracy = 0xfe,
.clockQuality.offsetScaledLogVariance = 0xffff,
.domainNumber = 0,
@@ -223,6 +222,8 @@ int main(int argc, char *argv[])
sk_check_fupsync = config_get_int(cfg, NULL, "check_fup_sync");
sk_tx_timeout = config_get_int(cfg, NULL, "tx_timestamp_timeout");
+ ds->clockQuality.clockClass = config_get_int(cfg, NULL, "clockClass");
+
if (config_get_int(cfg, NULL, "slaveOnly")) {
ds->flags |= DDS_SLAVE_ONLY;
ds->clockQuality.clockClass = 248;
--
2.1.4
------------------------------------------------------------------------------
_______________________________________________
Linuxptp-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel