From: Izunna Otiji <izunna.otiji...@renesas.com> Signed-off-by: Izunna Otiji <izunna.otiji...@renesas.com> --- clock.c | 8 ++++++++ pmc_common.c | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/clock.c b/clock.c index bd554a1..05b5f31 100644 --- a/clock.c +++ b/clock.c @@ -527,6 +527,14 @@ static int clock_management_set(struct clock *c, struct port *p, *changed = 1; respond = 1; break; + case MID_SLAVE_ONLY: + mtd = (struct management_tlv_datum *) tlv->data; + c->dds.flags &= ~DDS_SLAVE_ONLY; + if (mtd->val) + c->dds.flags |= DDS_SLAVE_ONLY; + *changed = 1; + respond = 1; + break; case MID_GRANDMASTER_SETTINGS_NP: gsn = (struct grandmaster_settings_np *) tlv->data; c->dds.clockQuality = gsn->clockQuality; diff --git a/pmc_common.c b/pmc_common.c index a5a40e5..07da295 100644 --- a/pmc_common.c +++ b/pmc_common.c @@ -108,7 +108,7 @@ struct management_id idtab[] = { { "PRIORITY1", MID_PRIORITY1, do_set_action }, { "PRIORITY2", MID_PRIORITY2, do_set_action }, { "DOMAIN", MID_DOMAIN, do_set_action }, - { "SLAVE_ONLY", MID_SLAVE_ONLY, do_get_action }, + { "SLAVE_ONLY", MID_SLAVE_ONLY, do_set_action }, { "TIME", MID_TIME, not_supported }, { "CLOCK_ACCURACY", MID_CLOCK_ACCURACY, do_get_action }, { "UTC_PROPERTIES", MID_UTC_PROPERTIES, not_supported }, @@ -195,6 +195,7 @@ static void do_set_action(struct pmc *pmc, int action, int index, char *str) case MID_PRIORITY1: case MID_PRIORITY2: case MID_DOMAIN: + case MID_SLAVE_ONLY: cnt = sscanf(str, " %*s %*s %hhu", &mtd.val); if (cnt != 1) { fprintf(stderr, "%s SET needs 1 value\n", -- 2.37.2 _______________________________________________ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel