From: Izunna Otiji <izunna.otiji...@renesas.com> Signed-off-by: Izunna Otiji <izunna.otiji...@renesas.com> --- pmc_common.c | 3 ++- port.c | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/pmc_common.c b/pmc_common.c index a3f2276..bc01903 100644 --- a/pmc_common.c +++ b/pmc_common.c @@ -123,7 +123,7 @@ struct management_id idtab[] = { { "ALTERNATE_TIME_OFFSET_NAME", MID_ALTERNATE_TIME_OFFSET_NAME, not_supported }, { "ALTERNATE_TIME_OFFSET_MAX_KEY", MID_ALTERNATE_TIME_OFFSET_MAX_KEY, not_supported }, { "ALTERNATE_TIME_OFFSET_PROPERTIES", MID_ALTERNATE_TIME_OFFSET_PROPERTIES, not_supported }, - { "MASTER_ONLY", MID_MASTER_ONLY, do_get_action }, + { "MASTER_ONLY", MID_MASTER_ONLY, do_set_action }, { "TRANSPARENT_CLOCK_DEFAULT_DATA_SET", MID_TRANSPARENT_CLOCK_DEFAULT_DATA_SET, not_supported }, { "PRIMARY_DOMAIN", MID_PRIMARY_DOMAIN, not_supported }, { "TIME_STATUS_NP", MID_TIME_STATUS_NP, do_get_action }, @@ -197,6 +197,7 @@ static void do_set_action(struct pmc *pmc, int action, int index, char *str) case MID_DOMAIN: case MID_SLAVE_ONLY: case MID_ANNOUNCE_RECEIPT_TIMEOUT: + case MID_MASTER_ONLY: cnt = sscanf(str, " %*s %*s %hhu", &mtd.val); if (cnt != 1) { fprintf(stderr, "%s SET needs 1 value\n", diff --git a/port.c b/port.c index ff0a6ca..96eb98e 100644 --- a/port.c +++ b/port.c @@ -1125,6 +1125,11 @@ static int port_management_set(struct port *target, target->announceReceiptTimeout = mtd->val; respond = 1; break; + case MID_MASTER_ONLY: + mtd = (struct management_tlv_datum *) tlv->data; + target->master_only = mtd->val; + respond = 1; + break; case MID_PORT_DATA_SET_NP: pdsnp = (struct port_ds_np *) tlv->data; target->neighborPropDelayThresh = pdsnp->neighborPropDelayThresh; -- 2.37.2 _______________________________________________ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel