From 8a89c7d3c327c3594c8dc6251179c0e66b1ba3e5 Mon Sep 17 00:00:00 2001 From: Max Date: Wed, 27 Sep 2017 14:07:55 +0200 Subject: vty: print version and description for each phy When printing BTS via 'show bts ..' let's also print each TRX, which phy number and version it uses and its description. It's helpful in troubleshooting low-level issues as it allows vendor-specific code to easily expose firmware version. Related: SYS#3884 Change-Id: Iabcc862566b40a9314f3e1d17fda61d8ab24a3cd --- src/common/vty.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/common/vty.c') diff --git a/src/common/vty.c b/src/common/vty.c index ef56705f..77bb47d5 100644 --- a/src/common/vty.c +++ b/src/common/vty.c @@ -730,6 +730,7 @@ static unsigned int llist_length(struct llist_head *list) static void bts_dump_vty(struct vty *vty, struct gsm_bts *bts) { struct gsm_bts_role_bts *btsb = bts->role; + struct gsm_bts_trx *trx; vty_out(vty, "BTS %u is of %s type in band %s, has CI %u LAC %u, " "BSIC %u and %u TRX%s", @@ -767,6 +768,17 @@ static void bts_dump_vty(struct vty *vty, struct gsm_bts *bts) VTY_NEWLINE); vty_out(vty, " OML Link state: %s.%s", bts->oml_link ? "connected" : "disconnected", VTY_NEWLINE); + + llist_for_each_entry(trx, &bts->trx_list, list) { + struct phy_instance *pinst = trx_phy_instance(trx); + vty_out(vty, " TRX %u%s", trx->nr, VTY_NEWLINE); + if (pinst) { + vty_out(vty, " phy %d %s", pinst->num, pinst->version); + if (pinst->description) + vty_out(vty, " (%s)", pinst->description); + vty_out(vty, "%s", VTY_NEWLINE); + } + } } -- cgit v1.2.3