diff options
author | Philipp Maier <pmaier@sysmocom.de> | 2019-02-12 16:53:24 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2019-03-19 13:56:12 +0000 |
commit | a4332be9e9f11b52ed832544016b8558741d23b4 (patch) | |
tree | fda677c0c5e993a2089dd6bf807a7eee618e4d58 | |
parent | Constify pcu_rx_*() parameters (diff) | |
download | OsmoBTS-a4332be9e9f11b52ed832544016b8558741d23b4.tar.xz OsmoBTS-a4332be9e9f11b52ed832544016b8558741d23b4.zip |
oc2g: l1if: delay trx initialization to avoid race condition
On links with high latency it can happen that RADIO CARRIER OPSTART is
carried out to early, even before SET BTS ATTRIBUTES is carried out.
This means that important parameters for the initalization are not yet
set and the TRX initalization failed. Lets delay the TRX initalization a
bit in order to be sure that all BTS attributes are set before the
initalization is carried out.
Change-Id: Id3bdc88d28417e422d2c0c33b03be06f1a4706c2
Related: OS#3782
-rw-r--r-- | src/osmo-bts-oc2g/l1_if.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/osmo-bts-oc2g/l1_if.c b/src/osmo-bts-oc2g/l1_if.c index 52ec3e7a..e834879e 100644 --- a/src/osmo-bts-oc2g/l1_if.c +++ b/src/osmo-bts-oc2g/l1_if.c @@ -1494,13 +1494,25 @@ static int reset_compl_cb(struct gsm_bts_trx *trx, struct msgb *resp, return 0; } -int l1if_reset(struct oc2gl1_hdl *hdl) +/* FIXME: This delays the TRX initalization by 5 sec in order to avoid the + * occurrence of a race condition in the OML bringup. This a work around and + * should be fixed properly. See also OS#3782, OS#2470 and OS#2469 */ +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 */ |