diff options
Diffstat (limited to 'openbsc')
-rw-r--r-- | openbsc/include/openbsc/gsm_data.h | 2 | ||||
-rw-r--r-- | openbsc/src/e1_config.c | 15 | ||||
-rw-r--r-- | openbsc/src/e1_input.c | 7 |
3 files changed, 20 insertions, 4 deletions
diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h index a98302777..e3092f919 100644 --- a/openbsc/include/openbsc/gsm_data.h +++ b/openbsc/include/openbsc/gsm_data.h @@ -386,6 +386,8 @@ struct gsm_bts_trx { struct gsm_e1_subslot rsl_e1_link; u_int8_t rsl_tei; struct e1inp_sign_link *rsl_link; + /* Some BTS (specifically Ericsson RBS) have a per-TRX OML Link */ + struct e1inp_sign_link *oml_link; struct gsm_nm_state nm_state; struct tlv_parsed nm_attr; 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); diff --git a/openbsc/src/e1_input.c b/openbsc/src/e1_input.c index 79c3a5af4..b55fe2e62 100644 --- a/openbsc/src/e1_input.c +++ b/openbsc/src/e1_input.c @@ -268,7 +268,12 @@ int _abis_nm_sendmsg(struct msgb *msg) return -EINVAL; } - sign_link = msg->trx->bts->oml_link; + /* Check for TRX-specific OML link first */ + if (msg->trx->oml_link) + sign_link = msg->trx->oml_link; + else + sign_link = msg->trx->bts->oml_link; + e1i_ts = sign_link->ts; if (!bsc_timer_pending(&e1i_ts->sign.tx_timer)) { /* notify the driver we have something to write */ |