aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/osmo-bts/measurement.h2
-rw-r--r--src/common/l1sap.c6
-rw-r--r--src/common/measurement.c13
3 files changed, 16 insertions, 5 deletions
diff --git a/include/osmo-bts/measurement.h b/include/osmo-bts/measurement.h
index e32c8e81..283b0ffc 100644
--- a/include/osmo-bts/measurement.h
+++ b/include/osmo-bts/measurement.h
@@ -8,4 +8,6 @@ int lchan_new_ul_meas(struct gsm_lchan *lchan, struct bts_ul_meas *ulm, uint32_t
int lchan_meas_check_compute(struct gsm_lchan *lchan, uint32_t fn);
+void lchan_meas_process_measurement(struct gsm_lchan *lchan, struct bts_ul_meas *ulm, uint32_t fn);
+
#endif
diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index 8936674f..00ead8d5 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -528,11 +528,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_256bits / 256, true);
- lchan_new_ul_meas(lchan, &ulm, info_meas_ind->fn);
-
- /* Check measurement period end and prepare the UL measurment
- * report at Meas period End*/
- lchan_meas_check_compute(lchan, info_meas_ind->fn);
+ lchan_meas_process_measurement(lchan, &ulm, info_meas_ind->fn);
return 0;
}
diff --git a/src/common/measurement.c b/src/common/measurement.c
index 01f1e5dc..a75b54da 100644
--- a/src/common/measurement.c
+++ b/src/common/measurement.c
@@ -477,3 +477,16 @@ int lchan_meas_check_compute(struct gsm_lchan *lchan, uint32_t fn)
return 1;
}
+
+/* Process a single uplink measurement sample. This function is called from
+ * l1sap.c every time a measurement indication is received. It collects the
+ * measurement samples and automatically detects the end oft the measurement
+ * interval. */
+void lchan_meas_process_measurement(struct gsm_lchan *lchan, struct bts_ul_meas *ulm, uint32_t fn)
+{
+ lchan_new_ul_meas(lchan, ulm, fn);
+
+ /* Check measurement period end and prepare the UL
+ * measurment report at Meas period End */
+ lchan_meas_check_compute(lchan, fn);
+}