aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/e1_config.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2011-02-13 19:36:18 +0100
committerHarald Welte <laforge@gnumonks.org>2011-02-13 19:36:18 +0100
commit15ccc77f62045d5243571a1fe3359432dd16d13b (patch)
treeb69a373771ca1ec5758d4209e6793157ab148945 /openbsc/src/e1_config.c
parent82b03a1f2be327f2b5239dc79b75fced2e642520 (diff)
INPUT: Allow for a per-TRX OML link
So far, all BTS we have interfaced had one OML link per BTS, independent of the number of TRX. In Ericsson RBS 2000, there is an OML link for the DXU/IXU, and one additional OML link for each TRX/TRU.
Diffstat (limited to 'openbsc/src/e1_config.c')
-rw-r--r--openbsc/src/e1_config.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/openbsc/src/e1_config.c b/openbsc/src/e1_config.c
index db290cbae..9e191ba63 100644
--- a/openbsc/src/e1_config.c
+++ b/openbsc/src/e1_config.c
@@ -100,10 +100,19 @@ int e1_reconfig_trx(struct gsm_bts_trx *trx)
}
sign_ts = &line->ts[e1_link->e1_ts-1];
e1inp_ts_config(sign_ts, line, E1INP_TS_TYPE_SIGN);
+ /* Ericsson RBS have a per-TRX OML link in parallel to RSL */
if (trx->bts->type == GSM_BTS_TYPE_RBS2000) {
- /* FIXME: where to put the reference of the per-TRX OML? */
- e1inp_sign_link_create(sign_ts, E1INP_SIGN_OML, trx,
- trx->rsl_tei, SAPI_OML);
+ struct e1inp_sign_link *oml_link;
+ oml_link = e1inp_sign_link_create(sign_ts, E1INP_SIGN_OML, trx,
+ trx->rsl_tei, SAPI_OML);
+ if (!oml_link) {
+ LOGP(DINP, LOGL_ERROR, "TRX (%u/$u) OML link creation "
+ "failed\n", trx->bts->nr, trx->nr);
+ return -ENOMEM;
+ }
+ if (trx->oml_link)
+ e1inp_sign_link_destroy(trx->oml_link);
+ trx->oml_link = oml_link;
}
rsl_link = e1inp_sign_link_create(sign_ts, E1INP_SIGN_RSL,
trx, trx->rsl_tei, SAPI_RSL);