summaryrefslogtreecommitdiffstats
path: root/src/host/trxcon/l1ctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/host/trxcon/l1ctl.c')
-rw-r--r--src/host/trxcon/l1ctl.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/host/trxcon/l1ctl.c b/src/host/trxcon/l1ctl.c
index 4abec77c..c01d372b 100644
--- a/src/host/trxcon/l1ctl.c
+++ b/src/host/trxcon/l1ctl.c
@@ -245,8 +245,24 @@ static int l1ctl_rx_reset_req(struct l1ctl_link *l1l, struct msgb *msg)
LOGP(DL1C, LOGL_DEBUG, "Recv Reset Req (%u)\n", res->type);
- osmo_fsm_inst_dispatch(trxcon_fsm,
- L1CTL_EVENT_RESET_REQ, res);
+ switch (res->type) {
+ case L1CTL_RES_T_FULL:
+ /* TODO: implement trx_if_reset() */
+ trx_if_flush_ctrl(l1l->trx);
+ trx_if_cmd_poweroff(l1l->trx);
+ trx_if_cmd_echo(l1l->trx);
+
+ /* Fall through */
+ case L1CTL_RES_T_SCHED:
+ sched_trx_reset(l1l->trx);
+ break;
+ default:
+ LOGP(DL1C, LOGL_ERROR, "Unknown L1CTL_RESET_REQ type\n");
+ goto exit;
+ }
+
+ /* Confirm */
+ rc = l1ctl_tx_reset_conf(l1l, res->type);
exit:
msgb_free(msg);