From 1effad1004d203c755b475ea6ef26586d45153f0 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Fri, 23 Feb 2018 13:52:44 +0100 Subject: measurement.c: Hand Frame Number into measurement computation This is currently only used for logging, but will be needed for proper RX{LEV,QUAL}-SUB reporting in upcoming patches. Related: OS#2978 Change-Id: I07fd06e8a379cab7c0c2eb111c3f5600037d3c9e --- include/osmo-bts/measurement.h | 2 +- src/common/l1sap.c | 2 +- src/common/measurement.c | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/osmo-bts/measurement.h b/include/osmo-bts/measurement.h index 47b31a29..e32c8e81 100644 --- a/include/osmo-bts/measurement.h +++ b/include/osmo-bts/measurement.h @@ -4,7 +4,7 @@ #define MEAS_MAX_TIMING_ADVANCE 63 #define MEAS_MIN_TIMING_ADVANCE 0 -int lchan_new_ul_meas(struct gsm_lchan *lchan, struct bts_ul_meas *ulm); +int lchan_new_ul_meas(struct gsm_lchan *lchan, struct bts_ul_meas *ulm, uint32_t fn); int lchan_meas_check_compute(struct gsm_lchan *lchan, uint32_t fn); diff --git a/src/common/l1sap.c b/src/common/l1sap.c index 01b454c4..f6a04eab 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -529,7 +529,7 @@ static int l1sap_info_meas_ind(struct gsm_bts_trx *trx, /* we assume that symbol period is 1 bit: */ set_ms_to_data(lchan, info_meas_ind->ta_offs_qbits / 4, true); - lchan_new_ul_meas(lchan, &ulm); + lchan_new_ul_meas(lchan, &ulm, info_meas_ind->fn); /* Check measurement period end and prepare the UL measurment * report at Meas period End*/ diff --git a/src/common/measurement.c b/src/common/measurement.c index 4b486d3a..69fbd94c 100644 --- a/src/common/measurement.c +++ b/src/common/measurement.c @@ -181,20 +181,20 @@ static int is_meas_complete(struct gsm_lchan *lchan, uint32_t fn) } /* receive a L1 uplink measurement from L1 */ -int lchan_new_ul_meas(struct gsm_lchan *lchan, struct bts_ul_meas *ulm) +int lchan_new_ul_meas(struct gsm_lchan *lchan, struct bts_ul_meas *ulm, uint32_t fn) { - DEBUGP(DMEAS, "%s adding measurement, num_ul_meas=%d\n", + DEBUGPFN(DMEAS, fn, "%s adding measurement, num_ul_meas=%d\n", gsm_lchan_name(lchan), lchan->meas.num_ul_meas); if (lchan->state != LCHAN_S_ACTIVE) { - LOGP(DMEAS, LOGL_NOTICE, + LOGPFN(DMEAS, LOGL_NOTICE, fn, "%s measurement during state: %s, num_ul_meas=%d\n", gsm_lchan_name(lchan), gsm_lchans_name(lchan->state), lchan->meas.num_ul_meas); } if (lchan->meas.num_ul_meas >= ARRAY_SIZE(lchan->meas.uplink)) { - LOGP(DMEAS, LOGL_NOTICE, + LOGPFN(DMEAS, LOGL_NOTICE, fn, "%s no space for uplink measurement, num_ul_meas=%d\n", gsm_lchan_name(lchan), lchan->meas.num_ul_meas); return -ENOSPC; -- cgit v1.2.3