aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bts-trx/trx_vty.c
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2019-09-27 17:21:31 +0200
committerpespin <pespin@sysmocom.de>2019-10-05 20:50:13 +0000
commitca574b19d3e0b3ca2f9532130693d446ae61ca04 (patch)
treec5fbabc9f26bd7dec1f713c801b8c4e9ff01f36d /src/osmo-bts-trx/trx_vty.c
parent9e1f0e1a13678a1a31e681ce0995df95d1e2ea32 (diff)
bts-trx: Get rid of messy transceiver_available state handler
This variable meaning has been changing its exact meaning over time until finally not being really clear which kind of state it holds. Initially it seemed to be used to identfy whether CLOCK IND were being received. However, over time both osmo-bts and osmo-trx have evolved and were fixed so that clock indications are only sent by osmo-trx after POWERON command is sent. As a result, this state can be checked simply by looking at the "powered" phy_link variable, which is only set to true once the TRX has confirmed the POWERON command, and hence it is sending CLOCK IND. On the other hand, at some point in time "available" started to be set to 1 in bts_model_phy_link_open(), which means available is nowadays almost always 1 from startup until the end (only dropped during bts_shutdown(), when we are already exiting the process anyway). As a result, !available condition in scheduler_trx.c:trx_fn_timer_cb can almost never happen, because available is set to true already. Only possibility would be if an old process of osmo-trx (not set up by this BTS process) is still sending CLOCK INDs, but in that case we for sure don't want to configure the BTS based on that, but ignore them until this BTS process has again configured the TRX. So that whole check can be dropped. We are better checking for "powered" state, which is far more accurate, and we better do that in trx_if.c before calling trx_fn_timer_cb(). Other uses of "transceiver_available" being used can be changed to use plink->state!= PHY_LINK_SHUTDOWN, since available was already being set to 1 at the same time the plink->state was being set to PHY_LINK_CONNECTING. As a result of this state handling re-arrangement, OS#4215 is fixed since trx_if_powered() is used instead of previous state condition to check whether data frames should be sent. Related: OS#4215 Change-Id: I35f4697bd33dbe8a4c76c9500b82c16589c701d4
Diffstat (limited to 'src/osmo-bts-trx/trx_vty.c')
-rw-r--r--src/osmo-bts-trx/trx_vty.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/osmo-bts-trx/trx_vty.c b/src/osmo-bts-trx/trx_vty.c
index 993c7809..86f57121 100644
--- a/src/osmo-bts-trx/trx_vty.c
+++ b/src/osmo-bts-trx/trx_vty.c
@@ -58,12 +58,6 @@ DEFUN(show_transceiver, show_transceiver_cmd, "show transceiver",
struct gsm_bts_trx *trx;
struct trx_l1h *l1h;
- if (!transceiver_available) {
- vty_out(vty, "transceiver is not connected%s", VTY_NEWLINE);
- } else {
- vty_out(vty, "transceiver is connected%s", VTY_NEWLINE);
- }
-
llist_for_each_entry(trx, &bts->trx_list, list) {
struct phy_instance *pinst = trx_phy_instance(trx);
struct phy_link *plink = pinst->phy_link;