aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2011-06-29 10:38:34 +0200
committerHarald Welte <laforge@gnumonks.org>2011-06-29 10:39:27 +0200
commitc7921c9205ae3ac131f4ce6447876fc46cd32fae (patch)
tree5bfdc9691e058fd1fa8ab01685aca303581f762a /openbsc
parente86b3ebf2e451993c7db50f9d27f2d1b723fe071 (diff)
add lchan->meas for BTS side code
TODO: move all of the BTS side per-lchan data behind a 'void *role' pointer like 'struct gsm_bts'
Diffstat (limited to 'openbsc')
-rw-r--r--openbsc/include/openbsc/gsm_data_shared.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/openbsc/include/openbsc/gsm_data_shared.h b/openbsc/include/openbsc/gsm_data_shared.h
index dbc85eda3..b3b7b9050 100644
--- a/openbsc/include/openbsc/gsm_data_shared.h
+++ b/openbsc/include/openbsc/gsm_data_shared.h
@@ -114,6 +114,25 @@ enum gsm_lchan_state {
LCHAN_S_INACTIVE, /* channel is set inactive */
};
+/* BTS ONLY */
+#define MAX_NUM_UL_MEAS 104
+#define LC_UL_M_F_L1_VALID (1 << 0)
+#define LC_UL_M_F_RES_VALID (1 << 1)
+
+struct bts_ul_meas {
+ /* BER in units of 0.01%: 10.000 == 100% ber, 0 == 0% ber */
+ uint16_t ber10k;
+ /* timing advance offset (in quarter bits) */
+ int16_t ta_offs_qbits;
+ /* C/I ratio in dB */
+ float c_i;
+ /* flags */
+ uint8_t is_sub:1;
+ /* RSSI in dBm * -1 */
+ uint8_t inv_rssi;
+};
+/* /BTS ONLY */
+
struct gsm_lchan {
/* The TS that we're part of */
struct gsm_bts_trx_ts *ts;
@@ -184,9 +203,28 @@ struct gsm_lchan {
/* buffers where we put the pre-computed SI */
sysinfo_buf_t buf[_MAX_SYSINFO_TYPE];
} si;
+ struct {
+ uint8_t flags;
+ /* RSL measurment result number, 0 at lchan_act */
+ uint8_t res_nr;
+ /* current Tx power level of the BTS */
+ uint8_t bts_tx_pwr;
+ /* number of measurements stored in array below */
+ uint8_t num_ul_meas;
+ 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;
+ } meas;
#endif
};
+
struct gsm_e1_subslot {
/* Number of E1 link */
uint8_t e1_nr;