summaryrefslogtreecommitdiffstats
path: root/src/host/trxcon/trxcon.c
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2017-06-09 01:10:05 +0700
committerVadim Yanitskiy <axilirator@gmail.com>2017-11-19 17:35:07 +0700
commit9b1d398685e70e3bc9ed2fa1a07209a24e2b31b6 (patch)
tree810e5ca0f54da3a3e49f70b0176edd9b0fd8b9f1 /src/host/trxcon/trxcon.c
parent90a0d3c78dbebc9722629c31dd8fcdf19c148cb4 (diff)
host/trxcon/scheduler: add basic clock counter
The core of scheduler is a simple clock counter, which relays on system time for now. One was a bit simplified and migrated from OsmoBTS. Due to system time is not an ideal clock source, the counter should be periodically corrected by clock indications from BTS. Change-Id: I27d85bd3e2c8bca3f876f73517027b9fe43c9825
Diffstat (limited to 'src/host/trxcon/trxcon.c')
-rw-r--r--src/host/trxcon/trxcon.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/host/trxcon/trxcon.c b/src/host/trxcon/trxcon.c
index a90d038d..ace2f79a 100644
--- a/src/host/trxcon/trxcon.c
+++ b/src/host/trxcon/trxcon.c
@@ -104,6 +104,8 @@ static void trxcon_fsm_managed_action(struct osmo_fsm_inst *fi,
break;
case TRX_EVENT_RSP_ERROR:
case TRX_EVENT_OFFLINE:
+ case SCH_EVENT_CLCK_IND:
+ case SCH_EVENT_CLCK_LOSS:
/* TODO: notify L2 & L3 about that */
break;
default:
@@ -125,7 +127,9 @@ static struct osmo_fsm_state trxcon_fsm_states[] = {
GEN_MASK(L1CTL_EVENT_RESET_REQ) |
GEN_MASK(TRX_EVENT_RESET_IND) |
GEN_MASK(TRX_EVENT_RSP_ERROR) |
- GEN_MASK(TRX_EVENT_OFFLINE)),
+ GEN_MASK(TRX_EVENT_OFFLINE) |
+ GEN_MASK(SCH_EVENT_CLCK_IND) |
+ GEN_MASK(SCH_EVENT_CLCK_LOSS)),
.out_state_mask = GEN_MASK(TRXCON_STATE_IDLE),
.name = "MANAGED",
.action = trxcon_fsm_managed_action,