aboutsummaryrefslogtreecommitdiffstats
path: root/include/osmocom
diff options
context:
space:
mode:
Diffstat (limited to 'include/osmocom')
-rw-r--r--include/osmocom/bsc/gsm_data.h14
-rw-r--r--include/osmocom/bsc/power_control.h9
2 files changed, 23 insertions, 0 deletions
diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index b16614695..9369b5d9a 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -665,6 +665,19 @@ struct lchan_modify_info {
#define INTERF_DBM_UNKNOWN 0
#define INTERF_BAND_UNKNOWN 0xff
+/* Measurement pre-processing state */
+struct gsm_power_ctrl_meas_proc_state {
+ /* Number of measurements processed */
+ unsigned int meas_num;
+ /* Algorithm specific data */
+ union {
+ struct {
+ /* Scaled up 100 times average value */
+ int Avg100;
+ } ewma;
+ };
+};
+
struct gsm_lchan {
/* The TS that we're part of */
struct gsm_bts_trx_ts *ts;
@@ -808,6 +821,7 @@ struct gsm_lchan {
/* Actual reported interference band index, or INTERF_BAND_UNKNOWN if this lchan was not included in the most
* recent Resource Indication. */
uint8_t interf_band;
+ struct gsm_power_ctrl_meas_proc_state rxlev_meas_proc;
};
/* One Timeslot in a TRX */
diff --git a/include/osmocom/bsc/power_control.h b/include/osmocom/bsc/power_control.h
new file mode 100644
index 000000000..1e4ba0242
--- /dev/null
+++ b/include/osmocom/bsc/power_control.h
@@ -0,0 +1,9 @@
+#pragma once
+
+#include <stdint.h>
+#include <osmocom/bsc/gsm_data.h>
+#include <osmocom/bsc/meas_rep.h>
+
+void crude_ms_power_loop(struct gsm_lchan *lchan, struct gsm_meas_rep *mr);
+
+int lchan_ms_pwr_ctrl(struct gsm_lchan *lchan, struct gsm_meas_rep *mr);