aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2013-03-07 18:38:09 +0000
committerHarald Welte <laforge@gnumonks.org>2014-08-25 09:20:33 +0200
commit7ff4f0e0fc692bfab829da50edb104e58b271e7e (patch)
treed4d7112b8ee8e49d7e7c28ab58d977aedff3c87c
parent5160996d4a24fdb9faf0317c489689b5c31eebee (diff)
port over to libosmocore include/osmocom/gsm/meas_rep.h
Back in March 2013, some structures and defines related to decoded measurement reports have been moved from openbsc to libosmocore (libosmocore e128f4663104ed64e33e362cff2566f36d65e658) so that they can be used also from osmo-bts. This finally makes gsm_lchan follow suit for osmo-bts.
-rw-r--r--openbsc/include/openbsc/gsm_data_shared.h8
-rw-r--r--openbsc/include/openbsc/meas_rep.h25
2 files changed, 4 insertions, 29 deletions
diff --git a/openbsc/include/openbsc/gsm_data_shared.h b/openbsc/include/openbsc/gsm_data_shared.h
index 2fdc7638d..0704bd753 100644
--- a/openbsc/include/openbsc/gsm_data_shared.h
+++ b/openbsc/include/openbsc/gsm_data_shared.h
@@ -13,6 +13,7 @@
#include <osmocom/gsm/tlv.h>
#include <osmocom/gsm/rxlev_stat.h>
#include <osmocom/gsm/sysinfo.h>
+#include <osmocom/gsm/meas_rep.h>
#include <osmocom/gsm/protocol/gsm_08_58.h>
#include <osmocom/gsm/protocol/gsm_12_21.h>
@@ -275,12 +276,7 @@ struct gsm_lchan {
struct bts_ul_meas uplink[MAX_NUM_UL_MEAS];
/* last L1 header from the MS */
uint8_t l1_info[2];
- struct {
- uint8_t rxlev_full;
- uint8_t rxlev_sub;
- uint8_t rxqual_full;
- uint8_t rxqual_sub;
- } res;
+ struct gsm_meas_rep_unidir ul_res;
} meas;
struct {
struct amr_multirate_conf amr_mr;
diff --git a/openbsc/include/openbsc/meas_rep.h b/openbsc/include/openbsc/meas_rep.h
index f235df6aa..6d36f347f 100644
--- a/openbsc/include/openbsc/meas_rep.h
+++ b/openbsc/include/openbsc/meas_rep.h
@@ -3,6 +3,8 @@
#include <stdint.h>
+#include <osmocom/gsm/meas_rep.h>
+
#define MRC_F_PROCESSED 0x0001
/* extracted from a L3 measurement report IE */
@@ -14,18 +16,6 @@ struct gsm_meas_rep_cell {
unsigned int flags;
};
-/* RX Level and RX Quality */
-struct gsm_rx_lev_qual {
- uint8_t rx_lev;
- uint8_t rx_qual;
-};
-
-/* unidirectional measumrement report */
-struct gsm_meas_rep_unidir {
- struct gsm_rx_lev_qual full;
- struct gsm_rx_lev_qual sub;
-};
-
#define MEAS_REP_F_UL_DTX 0x01
#define MEAS_REP_F_DL_VALID 0x02
#define MEAS_REP_F_BA1 0x04
@@ -60,17 +50,6 @@ struct gsm_meas_rep {
struct gsm_meas_rep_cell cell[6];
};
-enum meas_rep_field {
- MEAS_REP_DL_RXLEV_FULL,
- MEAS_REP_DL_RXLEV_SUB,
- MEAS_REP_DL_RXQUAL_FULL,
- MEAS_REP_DL_RXQUAL_SUB,
- MEAS_REP_UL_RXLEV_FULL,
- MEAS_REP_UL_RXLEV_SUB,
- MEAS_REP_UL_RXQUAL_FULL,
- MEAS_REP_UL_RXQUAL_SUB,
-};
-
/* obtain an average over the last 'num' fields in the meas reps */
int get_meas_rep_avg(const struct gsm_lchan *lchan,
enum meas_rep_field field, unsigned int num);