Skip to content

Commit d312c6e

Browse files
jukkarMaureenHelm
authored andcommitted
net: gptp: Print priority1 and priority2 vars in net-shell
Print the default values of BMCA priority1 and priority2 variables in net-shell. Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
1 parent e3fd170 commit d312c6e

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

subsys/net/ip/net_shell.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2140,11 +2140,14 @@ static void gptp_print_port_info(const struct shell *shell, int port)
21402140
struct gptp_port_bmca_data *port_bmca_data;
21412141
struct gptp_port_param_ds *port_param_ds;
21422142
struct gptp_port_states *port_state;
2143+
struct gptp_domain *gptp_domain;
21432144
struct gptp_port_ds *port_ds;
21442145
struct net_if *iface;
21452146
int ret, i;
21462147

2147-
ret = gptp_get_port_data(gptp_get_domain(),
2148+
gptp_domain = gptp_get_domain();
2149+
2150+
ret = gptp_get_port_data(gptp_domain,
21482151
port,
21492152
&port_ds,
21502153
&port_param_ds,
@@ -2241,6 +2244,12 @@ static void gptp_print_port_info(const struct shell *shell, int port)
22412244
"transmission interval for the port",
22422245
USCALED_NS_TO_NS(port_ds->pdelay_req_itv.low) /
22432246
(NSEC_PER_USEC * USEC_PER_MSEC));
2247+
PR("BMCA %s %s%d%s: %d\n", "default", "priority", 1,
2248+
" ",
2249+
gptp_domain->default_ds.priority1);
2250+
PR("BMCA %s %s%d%s: %d\n", "default", "priority", 2,
2251+
" ",
2252+
gptp_domain->default_ds.priority2);
22442253

22452254
PR("\nRuntime status:\n");
22462255
PR("Current global port state "

0 commit comments

Comments
 (0)