summaryrefslogtreecommitdiffstats
path: root/openbsc/src/libbsc/abis_om2000.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2011-09-26 23:43:23 +0200
committerHarald Welte <laforge@gnumonks.org>2011-09-26 23:44:49 +0200
commit15eae8dcafc86400a6340b8dcb4b5e8ec3a4fe66 (patch)
tree80c8b7b6bd2287d19c3152f1f99aa07fc31d19b3 /openbsc/src/libbsc/abis_om2000.c
parent4f8ad5350a1e4dbccf72cc4a61f2b3665e5202ac (diff)
Fix Ericsson RBS2000 support after libosmo-abis merge
The libosmo-abis merge broke Ericsson RBS support, as it didn't get the part right where the per-TRX OML sign_link is determined while transmitting OM2000 messages. As a result of this fix, we can remove the 'to_trx_oml' parameter to _abis_nm_sendmsg(), which is a nice cleanup.
Diffstat (limited to 'openbsc/src/libbsc/abis_om2000.c')
-rw-r--r--openbsc/src/libbsc/abis_om2000.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/openbsc/src/libbsc/abis_om2000.c b/openbsc/src/libbsc/abis_om2000.c
index 22164627d..e2e05780d 100644
--- a/openbsc/src/libbsc/abis_om2000.c
+++ b/openbsc/src/libbsc/abis_om2000.c
@@ -799,8 +799,8 @@ static void signal_op_state(struct gsm_bts *bts, struct abis_om2k_mo *mo)
static int abis_om2k_sendmsg(struct gsm_bts *bts, struct msgb *msg)
{
- struct e1inp_sign_link *sign_link = (struct e1inp_sign_link *)msg;
struct abis_om2k_hdr *o2h;
+ struct gsm_bts_trx *trx;
int to_trx_oml;
msg->l2h = msg->data;
@@ -814,9 +814,8 @@ static int abis_om2k_sendmsg(struct gsm_bts *bts, struct msgb *msg)
case OM2K_MO_CLS_TX:
case OM2K_MO_CLS_RX:
/* Route through per-TRX OML Link to the appropriate TRX */
- to_trx_oml = 1;
- sign_link->trx = gsm_bts_trx_by_nr(bts, o2h->mo.inst);
- if (!sign_link->trx) {
+ trx = gsm_bts_trx_by_nr(bts, o2h->mo.inst);
+ if (!trx) {
LOGP(DNM, LOGL_ERROR, "MO=%s Tx Dropping msg to "
"non-existing TRX\n", om2k_mo_name(&o2h->mo));
return -ENODEV;
@@ -824,9 +823,8 @@ static int abis_om2k_sendmsg(struct gsm_bts *bts, struct msgb *msg)
break;
case OM2K_MO_CLS_TS:
/* Route through per-TRX OML Link to the appropriate TRX */
- to_trx_oml = 1;
- sign_link->trx = gsm_bts_trx_by_nr(bts, o2h->mo.assoc_so);
- if (!sign_link->trx) {
+ trx = gsm_bts_trx_by_nr(bts, o2h->mo.assoc_so);
+ if (!trx) {
LOGP(DNM, LOGL_ERROR, "MO=%s Tx Dropping msg to "
"non-existing TRX\n", om2k_mo_name(&o2h->mo));
return -ENODEV;
@@ -834,12 +832,12 @@ static int abis_om2k_sendmsg(struct gsm_bts *bts, struct msgb *msg)
break;
default:
/* Route through the IXU/DXU OML Link */
- sign_link->trx = bts->c0;
- to_trx_oml = 0;
+ trx = bts->c0;
break;
}
+ msg->dst = trx->oml_link;
- return _abis_nm_sendmsg(msg, to_trx_oml);
+ return _abis_nm_sendmsg(msg);
}
static void fill_om2k_hdr(struct abis_om2k_hdr *o2h, const struct abis_om2k_mo *mo,