This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
pespin gerrit-no-reply at lists.osmocom.orgpespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/15627 Change subject: bts-trx: vty: Print phy link state in cmd 'show transceiver' ...................................................................... bts-trx: vty: Print phy link state in cmd 'show transceiver' Change-Id: I8e49f8edad9f9c68d110dbb7faeea5143aa91022 --- M include/osmo-bts/phy_link.h M src/common/phy_link.c M src/osmo-bts-trx/trx_vty.c 3 files changed, 16 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/27/15627/1 diff --git a/include/osmo-bts/phy_link.h b/include/osmo-bts/phy_link.h index 3bf5159..a06cf3f 100644 --- a/include/osmo-bts/phy_link.h +++ b/include/osmo-bts/phy_link.h @@ -157,6 +157,8 @@ struct phy_link *phy_link_create(void *ctx, int num); void phy_link_destroy(struct phy_link *plink); void phy_link_state_set(struct phy_link *plink, enum phy_link_state state); +enum phy_link_state phy_link_state_get(struct phy_link *plink); +const char *phy_link_state_name(enum phy_link_state state); int phy_links_open(void); struct phy_instance *phy_instance_by_num(struct phy_link *plink, int num); diff --git a/src/common/phy_link.c b/src/common/phy_link.c index 588fcc9..85f9e14 100644 --- a/src/common/phy_link.c +++ b/src/common/phy_link.c @@ -81,6 +81,16 @@ plink->state = state; } +enum phy_link_state phy_link_state_get(struct phy_link *plink) +{ + return plink->state; +} + +const char *phy_link_state_name(enum phy_link_state state) +{ + return get_value_string(phy_link_state_vals, state); +} + struct phy_instance *phy_instance_by_num(struct phy_link *plink, int num) { struct phy_instance *pinst; diff --git a/src/osmo-bts-trx/trx_vty.c b/src/osmo-bts-trx/trx_vty.c index 250d180..f554ae5 100644 --- a/src/osmo-bts-trx/trx_vty.c +++ b/src/osmo-bts-trx/trx_vty.c @@ -66,13 +66,16 @@ llist_for_each_entry(trx, &bts->trx_list, list) { struct phy_instance *pinst = trx_phy_instance(trx); - char *sname = osmo_sock_get_name(NULL, pinst->phy_link->u.osmotrx.trx_ofd_clk.fd); + struct phy_link *plink = pinst->phy_link; + char *sname = osmo_sock_get_name(NULL, plink->u.osmotrx.trx_ofd_clk.fd); l1h = pinst->u.osmotrx.hdl; vty_out(vty, "TRX %d %s%s", trx->nr, sname, VTY_NEWLINE); talloc_free(sname); vty_out(vty, " %s%s", trx_if_powered(l1h) ? "poweron":"poweroff", VTY_NEWLINE); + vty_out(vty, "phy link state: %s%s", + phy_link_state_name(phy_link_state_get(plink)), VTY_NEWLINE); if (l1h->config.arfcn_valid) vty_out(vty, " arfcn : %d%s%s", (l1h->config.arfcn & ~ARFCN_PCS), -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/15627 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I8e49f8edad9f9c68d110dbb7faeea5143aa91022 Gerrit-Change-Number: 15627 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin at sysmocom.de> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190930/fca58836/attachment.htm>