aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2019-02-12 16:53:24 +0100
committerPhilipp Maier <pmaier@sysmocom.de>2019-02-12 16:54:14 +0100
commit36d326c81d2a004350806c7cea0cace2c0eac1ed (patch)
tree32686e4565be637d0bb8e18c9a358abfde74f546
parent268ba55a6ed81fff1935ecf6aad9f879ec07b288 (diff)
oc2g: l1if: delay trx initialization to avoid race conditionpmaier/omlhack
-rw-r--r--src/osmo-bts-oc2g/l1_if.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/osmo-bts-oc2g/l1_if.c b/src/osmo-bts-oc2g/l1_if.c
index d8fdd968..658e5707 100644
--- a/src/osmo-bts-oc2g/l1_if.c
+++ b/src/osmo-bts-oc2g/l1_if.c
@@ -1495,13 +1495,22 @@ static int reset_compl_cb(struct gsm_bts_trx *trx, struct msgb *resp,
return 0;
}
-int l1if_reset(struct oc2gl1_hdl *hdl)
+void l1if_reset_cb(void *arg)
{
+ struct oc2gl1_hdl *hdl = arg;
struct msgb *msg = sysp_msgb_alloc();
Oc2g_Prim_t *sysp = msgb_sysprim(msg);
sysp->id = Oc2g_PrimId_Layer1ResetReq;
- return l1if_req_compl(hdl, msg, reset_compl_cb, NULL);
+ l1if_req_compl(hdl, msg, reset_compl_cb, NULL);
+}
+
+int l1if_reset(struct oc2gl1_hdl *hdl)
+{
+ static struct osmo_timer_list T_l1if_reset;
+ osmo_timer_setup(&T_l1if_reset, l1if_reset_cb, hdl);
+ osmo_timer_schedule(&T_l1if_reset, 5, 0);
+ return 0;
}
/* set the trace flags within the DSP */