summaryrefslogtreecommitdiffstats
path: root/src/host/trxcon/trx_if.h
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2019-05-30 15:21:45 +0200
committerVadim Yanitskiy <axilirator@gmail.com>2019-05-31 22:35:31 +0700
commitfd6c211eab32d489a304bb3ae63774887a3d6024 (patch)
treeacb7e2b8cdc50b65d0a0f717c7879d25df95c863 /src/host/trxcon/trx_if.h
parent1a66c2991cbd90e5bdc51bfcfcfcd851b4abb2a3 (diff)
trxcon: Suppress POWERON to TRX if we're already powered on.
The existing logic unconditionally wants to send a POWERON command on TRXC whenever L1CTL_FBSB_REQ is received. That may cause some problems when sending subsequent L1CTL_FBSB_REQ, e.g. due to signal loss. Sending POWEROFF when transceiver is not powered on is normal though. This can happen if trxcon is restarted while fake_trx was running. The existing FSM state could unfortunately not been used, as it's a mixture between the TRX connection state and the command/response state. The current solution is just a work around. We definitely need to introduce separate state machines for transceiver and its TRXC interface. Change-Id: I834e8897b95a2490811319697fc7cab6076db480
Diffstat (limited to 'src/host/trxcon/trx_if.h')
-rw-r--r--src/host/trxcon/trx_if.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/host/trxcon/trx_if.h b/src/host/trxcon/trx_if.h
index 0b3f36f7..a44600d9 100644
--- a/src/host/trxcon/trx_if.h
+++ b/src/host/trxcon/trx_if.h
@@ -25,7 +25,10 @@ struct trx_instance {
struct osmo_timer_list trx_ctrl_timer;
struct llist_head trx_ctrl_list;
struct osmo_fsm_inst *fsm;
+
+ /* HACK: we need proper state machines */
uint32_t prev_state;
+ bool powered_up;
/* GSM L1 specific */
uint16_t pm_band_arfcn_start;