aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2018-02-12 16:47:40 +0100
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2018-02-19 15:51:18 +0000
commit35ba85c37d6fca81fc54dc4436d28030a8b70c3a (patch)
treec056b9cb09f05088d6e0fe7b760d7f3d36840a97
parentdd42eb9f90f62903f7d55a937225b2329cd9c84d (diff)
HO: lchan: store last seen measurement report nr, tweak log
Handover decision 2 will also store the last seen mr nr for neighbor cell measurements and hence can tell whether a neighbor's measurement is outdated. Change-Id: Ic1148364597f91b5a55666c80c758b61fa56f582
-rw-r--r--include/osmocom/bsc/gsm_data.h1
-rw-r--r--src/libbsc/abis_rsl.c5
-rw-r--r--src/libbsc/chan_alloc.c1
3 files changed, 5 insertions, 2 deletions
diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index 77fda0045..65fb32b6d 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -422,6 +422,7 @@ struct gsm_lchan {
struct gsm_meas_rep meas_rep[MAX_MEAS_REP];
int meas_rep_idx;
int meas_rep_count;
+ uint8_t meas_rep_last_seen_nr;
/* GSM Random Access data */
struct gsm48_req_ref *rqd_ref;
diff --git a/src/libbsc/abis_rsl.c b/src/libbsc/abis_rsl.c
index 261e6fe27..7400f896e 100644
--- a/src/libbsc/abis_rsl.c
+++ b/src/libbsc/abis_rsl.c
@@ -1523,8 +1523,9 @@ static int rsl_rx_meas_res(struct msgb *msg)
}
mr->lchan->meas_rep_count++;
- LOGP(DRSL, LOGL_DEBUG, "%s: meas_rep_cnt++=%d\n",
- gsm_lchan_name(mr->lchan), mr->lchan->meas_rep_count);
+ mr->lchan->meas_rep_last_seen_nr = mr->nr;
+ LOGP(DRSL, LOGL_DEBUG, "%s: meas_rep_count++=%d meas_rep_last_seen_nr=%u\n",
+ gsm_lchan_name(mr->lchan), mr->lchan->meas_rep_count, mr->lchan->meas_rep_last_seen_nr);
print_meas_rep(msg->lchan, mr);
diff --git a/src/libbsc/chan_alloc.c b/src/libbsc/chan_alloc.c
index 42a9e7393..21d509040 100644
--- a/src/libbsc/chan_alloc.c
+++ b/src/libbsc/chan_alloc.c
@@ -414,6 +414,7 @@ struct gsm_lchan *lchan_alloc(struct gsm_bts *bts, enum gsm_chan_t type,
/* reset measurement report counter and index */
lchan->meas_rep_count = 0;
lchan->meas_rep_idx = 0;
+ lchan->meas_rep_last_seen_nr = 255;
/* clear sapis */
memset(lchan->sapis, 0, ARRAY_SIZE(lchan->sapis));