summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2017-07-27 08:57:13 +0600
committerVadim Yanitskiy <axilirator@gmail.com>2017-10-23 22:05:49 +0330
commit08cea11b8efe34f45bbebfa3aef2e027450a230f (patch)
tree41f847ea9c615c00a7bf35fd4a97546d7ea5c0d1
parentaf4acb0d6b6f86353d7769e1cbae846fd5eeb7f0 (diff)
host/trxcon: get rid of useless trxcon fsm events
Both SCH_EVENT_CLCK_IND and SCH_EVENT_CLCK_LOSS were not handled, moreover there is no purpose to keep them. Change-Id: I8efac459a40f4287e3325890809991d5ef46e9b1
-rw-r--r--src/host/trxcon/sched_clck.c7
-rw-r--r--src/host/trxcon/sched_trx.c3
-rw-r--r--src/host/trxcon/trxcon.c6
-rw-r--r--src/host/trxcon/trxcon.h4
4 files changed, 4 insertions, 16 deletions
diff --git a/src/host/trxcon/sched_clck.c b/src/host/trxcon/sched_clck.c
index efb3f4c..9c1edc5 100644
--- a/src/host/trxcon/sched_clck.c
+++ b/src/host/trxcon/sched_clck.c
@@ -47,16 +47,12 @@
static void sched_clck_tick(void *data)
{
struct trx_sched *sched = (struct trx_sched *) data;
- struct trx_instance *trx = (struct trx_instance *) sched->data;
-
struct timeval tv_now, *tv_clock;
int32_t elapsed;
/* Check if transceiver is still alive */
if (sched->fn_counter_lost++ == TRX_LOSS_FRAMES) {
LOGP(DSCH, LOGL_NOTICE, "No more clock from transceiver\n");
-
- osmo_fsm_inst_dispatch(trxcon_fsm, SCH_EVENT_CLCK_LOSS, trx);
sched->state = SCH_CLCK_STATE_WAIT;
return;
@@ -74,7 +70,6 @@ static void sched_clck_tick(void *data)
LOGP(DSCH, LOGL_NOTICE, "PC clock skew: "
"elapsed uS %d\n", elapsed);
- osmo_fsm_inst_dispatch(trxcon_fsm, SCH_EVENT_CLCK_LOSS, trx);
sched->state = SCH_CLCK_STATE_WAIT;
return;
@@ -122,7 +117,6 @@ static void sched_clck_correct(struct trx_sched *sched,
int sched_clck_handle(struct trx_sched *sched, uint32_t fn)
{
- struct trx_instance *trx = (struct trx_instance *) sched->data;
struct timeval tv_now, *tv_clock;
int32_t elapsed, elapsed_fn;
@@ -138,7 +132,6 @@ int sched_clck_handle(struct trx_sched *sched, uint32_t fn)
sched_clck_correct(sched, &tv_now, fn);
LOGP(DSCH, LOGL_NOTICE, "Initial clock received: fn=%u\n", fn);
- osmo_fsm_inst_dispatch(trxcon_fsm, SCH_EVENT_CLCK_IND, trx);
sched->state = SCH_CLCK_STATE_OK;
return 0;
diff --git a/src/host/trxcon/sched_trx.c b/src/host/trxcon/sched_trx.c
index be7a480..cc9b1ce 100644
--- a/src/host/trxcon/sched_trx.c
+++ b/src/host/trxcon/sched_trx.c
@@ -152,6 +152,9 @@ int sched_trx_reset(struct trx_instance *trx)
sched->fn_counter_proc = 0;
sched->fn_counter_lost = 0;
+ /* Reset internal state */
+ sched->state = SCH_CLCK_STATE_WAIT;
+
return 0;
}
diff --git a/src/host/trxcon/trxcon.c b/src/host/trxcon/trxcon.c
index c0d5da3..f0fca16 100644
--- a/src/host/trxcon/trxcon.c
+++ b/src/host/trxcon/trxcon.c
@@ -99,8 +99,6 @@ 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:
case TRX_EVENT_RESET_IND:
/* TODO: notify L2 & L3 about that */
break;
@@ -121,9 +119,7 @@ static struct osmo_fsm_state trxcon_fsm_states[] = {
GEN_MASK(L1CTL_EVENT_DISCONNECT) |
GEN_MASK(TRX_EVENT_RESET_IND) |
GEN_MASK(TRX_EVENT_RSP_ERROR) |
- GEN_MASK(TRX_EVENT_OFFLINE) |
- GEN_MASK(SCH_EVENT_CLCK_IND) |
- GEN_MASK(SCH_EVENT_CLCK_LOSS)),
+ GEN_MASK(TRX_EVENT_OFFLINE)),
.out_state_mask = GEN_MASK(TRXCON_STATE_IDLE),
.name = "MANAGED",
.action = trxcon_fsm_managed_action,
diff --git a/src/host/trxcon/trxcon.h b/src/host/trxcon/trxcon.h
index 17d3408..1ab3a14 100644
--- a/src/host/trxcon/trxcon.h
+++ b/src/host/trxcon/trxcon.h
@@ -19,8 +19,4 @@ enum trxcon_fsm_events {
TRX_EVENT_RESET_IND,
TRX_EVENT_RSP_ERROR,
TRX_EVENT_OFFLINE,
-
- /* Scheduler specific events */
- SCH_EVENT_CLCK_IND,
- SCH_EVENT_CLCK_LOSS,
};