aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bsc/bts_ipaccess_nanobts.c
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2018-06-15 20:39:58 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2018-06-15 21:00:31 +0200
commitf0ff9a67117dc22d838769fe6eef67778abd43b9 (patch)
tree6e40d44dbc64f30b078175e48755ae928555d06c /src/osmo-bsc/bts_ipaccess_nanobts.c
parente7d29e34e4f3db0ec1a5f5b9263aec38a689a76d (diff)
fix dyn TS init: properly identify BTS on OML OPSTART ACK
Commit "dyn ts, bts_ipaccess_nanobts.c: init PDCH on Chan OPSTART ACK" bf7099262adf0f27e71a08387747c5cb0d459360 Icf6e25ff068e8a2600562d52726ead65e864ec02 introduced signal S_NM_OPSTART_ACK and passed the FOM header to identify the BTS by. But the FOM header's BTS number is zero on each Abis/IP link, and the BTS and TRX are actually identified by msgb->dst == e1inp_sign_link, member trx. So the initial implementation associated *all* Channel OPSTART ACKs with BTS 0. Pass the entire msgb as S_NM_OPSTART_ACK signal argument, implement a abis_nm_get_ts() to retrieve the proper timeslot and use that during timeslot init. Related: OS#3351 OS#3205 Change-Id: I45ce5c24cb62d00f350df1af1be6c11104d74193
Diffstat (limited to 'src/osmo-bsc/bts_ipaccess_nanobts.c')
-rw-r--r--src/osmo-bsc/bts_ipaccess_nanobts.c31
1 files changed, 7 insertions, 24 deletions
diff --git a/src/osmo-bsc/bts_ipaccess_nanobts.c b/src/osmo-bsc/bts_ipaccess_nanobts.c
index 843f264ae..0e23955c8 100644
--- a/src/osmo-bsc/bts_ipaccess_nanobts.c
+++ b/src/osmo-bsc/bts_ipaccess_nanobts.c
@@ -298,40 +298,23 @@ static int sw_activ_rep(struct msgb *mb)
return 0;
}
-static struct gsm_bts_trx_ts *gsm_bts_trx_ts(struct gsm_network *net,
- int bts_nr, int trx_nr, int ts_nr)
-{
- struct gsm_bts *bts;
- struct gsm_bts_trx *trx;
- bts = gsm_bts_num(net, bts_nr);
- if (!bts)
- return NULL;
- trx = gsm_bts_trx_by_nr(bts, trx_nr);
- if (!trx)
- return NULL;
- if (ts_nr < 0 || ts_nr > ARRAY_SIZE(trx->ts))
- return NULL;
- return &trx->ts[ts_nr];
-}
-
-static void nm_rx_opstart_ack_chan(struct abis_om_fom_hdr *foh)
+static void nm_rx_opstart_ack_chan(struct msgb *oml_msg)
{
struct gsm_bts_trx_ts *ts;
- ts = gsm_bts_trx_ts(bsc_gsmnet, foh->obj_inst.bts_nr, foh->obj_inst.trx_nr, foh->obj_inst.ts_nr);
- if (!ts) {
- LOGP(DNM, LOGL_ERROR, "%s Channel OPSTART ACK for non-existent TS\n",
- abis_nm_dump_foh(foh));
+ ts = abis_nm_get_ts(oml_msg);
+ if (!ts)
+ /* error already logged in abis_nm_get_ts() */
return;
- }
gsm_ts_check_init(ts);
}
-static void nm_rx_opstart_ack(struct abis_om_fom_hdr *foh)
+static void nm_rx_opstart_ack(struct msgb *oml_msg)
{
+ struct abis_om_fom_hdr *foh = msgb_l3(oml_msg);
switch (foh->obj_class) {
case NM_OC_CHANNEL:
- nm_rx_opstart_ack_chan(foh);
+ nm_rx_opstart_ack_chan(oml_msg);
break;
default:
break;