aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2018-02-22 14:21:24 +0100
committerVadim Yanitskiy <axilirator@gmail.com>2018-02-23 14:05:51 +0000
commit232f53adf0e7ea3211bdfe60f7c3b629a9648fa1 (patch)
tree5dfabd8c25089509922ada3fb06af7deeec473f5
parentac0254c000d1eaad9a48a11922d538cd53f622bd (diff)
osmo-bts-virtual: Make sure PRIM_INFO_MEAS have non-zero frame number
Measurement reports fed into L1SAP so far had their frame number always set to zero, resulting in higher-layer common code above L1SAP to never detect the end of the measurement period, which in turn caused no RSL MEAS REP to be sent. Related: OS#2978 Change-Id: I67837d19515ea335614928570c12dd5027104c6b
-rw-r--r--src/osmo-bts-virtual/l1_if.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/osmo-bts-virtual/l1_if.c b/src/osmo-bts-virtual/l1_if.c
index 01314fa..6904fe6 100644
--- a/src/osmo-bts-virtual/l1_if.c
+++ b/src/osmo-bts-virtual/l1_if.c
@@ -296,7 +296,7 @@ int l1if_mph_time_ind(struct gsm_bts *bts, uint32_t fn)
static void l1if_fill_meas_res(struct osmo_phsap_prim *l1sap, uint8_t chan_nr, float ta,
- float ber, float rssi)
+ float ber, float rssi, uint32_t fn)
{
memset(l1sap, 0, sizeof(*l1sap));
osmo_prim_init(&l1sap->oph, SAP_GSM_PH, PRIM_MPH_INFO,
@@ -306,6 +306,7 @@ static void l1if_fill_meas_res(struct osmo_phsap_prim *l1sap, uint8_t chan_nr, f
l1sap->u.info.u.meas_ind.ta_offs_qbits = (int16_t)(ta*4);
l1sap->u.info.u.meas_ind.ber10k = (unsigned int) (ber * 10000);
l1sap->u.info.u.meas_ind.inv_rssi = (uint8_t) (rssi * -1);
+ l1sap->u.info.u.meas_ind.fn = fn;
}
static int l1if_process_meas_res(struct gsm_bts_trx *trx, uint8_t tn, uint32_t fn, uint8_t chan_nr,
@@ -321,7 +322,7 @@ static int l1if_process_meas_res(struct gsm_bts_trx *trx, uint8_t tn, uint32_t f
gsm_lchan_name(lchan), chan_nr, ms_pwr_dbm(lchan->ts->trx->bts->band, lchan->ms_power),
rssi, ber*100, n_errors, n_bits_total, lchan->meas.l1_info[1], lchan->rqd_ta, toa);
- l1if_fill_meas_res(&l1sap, chan_nr, lchan->rqd_ta + toa, ber, rssi);
+ l1if_fill_meas_res(&l1sap, chan_nr, lchan->rqd_ta + toa, ber, rssi, fn);
return l1sap_up(trx, &l1sap);
}