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
This commit is contained in:
Philipp Maier 2019-02-12 16:53:24 +01:00 committed by Harald Welte
parent 6bc6d78b36
commit a4332be9e9
1 changed files with 14 additions and 2 deletions

View File

@ -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 */