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.
This commit is contained in:
Harald Welte 2011-02-13 19:36:18 +01:00
parent 82b03a1f2b
commit 15ccc77f62
3 changed files with 20 additions and 4 deletions

View File

@ -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;

View File

@ -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);

View File

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