aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2023-10-02 17:41:25 +0200
committerAndreas Eversberg <jolly@eversberg.eu>2023-10-09 09:50:10 +0200
commitd561e2dcba936daac52dc3664071105448f93e72 (patch)
treeea8a34d0ad798319e97205e2766835fc6e6ae5f9
parent82f10a63584ce31326a2d3583386d0b8e7167e67 (diff)
Select correct neighbor list for measurement report decoding
System Information 2 (bis/ter) uses BA_IND of 0. This refers to "neigh_list". System information 5 (bis/ter) uses BA_IND of 1. This may refer to "neigh_list" or optionally "si5_neigh_list", depending on the VTY settings. If BA_IND of 1 is received in measurement report and if the optional "si5_neigh_list" is used, this list is chosen to decode the measurement report. Change-Id: Ie9123928fb3ae6f10921ecf01d1b50330661da38
-rw-r--r--src/osmo-bsc/gsm_04_08_rr.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/osmo-bsc/gsm_04_08_rr.c b/src/osmo-bsc/gsm_04_08_rr.c
index 67896b128..2c9f7e92a 100644
--- a/src/osmo-bsc/gsm_04_08_rr.c
+++ b/src/osmo-bsc/gsm_04_08_rr.c
@@ -902,7 +902,7 @@ int gsm48_parse_meas_rep(struct gsm_meas_rep *rep, struct msgb *msg)
struct gsm48_hdr *gh = msgb_l3(msg);
uint8_t *data = gh->data;
struct gsm_bts *bts = msg->lchan->ts->trx->bts;
- struct bitvec *nbv = &bts->si_common.neigh_list;
+ struct bitvec *nbv;
struct gsm_meas_rep_cell *mrc;
if (gh->msg_type != GSM48_MT_RR_MEAS_REP)
@@ -927,6 +927,13 @@ int gsm48_parse_meas_rep(struct gsm_meas_rep *rep, struct msgb *msg)
return 0;
}
+ /* If the phone reports BA-IND 1 this is a report for the SI5* set.
+ * If we have generated SI5* with manual SI5 neighbor list, the measurements refer to it. */
+ if ((rep->flags & MEAS_REP_F_BA1) && bts->neigh_list_manual_mode == NL_MODE_MANUAL_SI5SEP)
+ nbv = &bts->si_common.si5_neigh_list;
+ else
+ nbv = &bts->si_common.neigh_list;
+
/* an encoding nightmare in perfection */
mrc = &rep->cell[0];
mrc->rxlev = data[3] & 0x3f;