aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/vty.c
diff options
context:
space:
mode:
authorMax <msuraev@sysmocom.de>2017-09-27 14:07:55 +0200
committerMax <msuraev@sysmocom.de>2017-09-27 14:07:55 +0200
commit8a89c7d3c327c3594c8dc6251179c0e66b1ba3e5 (patch)
treec23f8c726ddb99362dc7a734f569503c3d7eb73c /src/common/vty.c
parentab4696bb2fcdf16451585c40275d3b931ab1db4c (diff)
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
Diffstat (limited to 'src/common/vty.c')
-rw-r--r--src/common/vty.c12
1 files changed, 12 insertions, 0 deletions
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);
+ }
+ }
}