blob: c36352e2a63a9edc0bef8c31bfa713f310997646 [file] [log] [blame]
Harald Welte3c7dc6e2009-11-29 19:07:28 +01001#ifndef _MEAS_REP_H
2#define _MEAS_REP_H
3
4/* extracted from a L3 measurement report IE */
5struct gsm_meas_rep_cell {
6 u_int8_t rxlev;
Harald Welte3c7dc6e2009-11-29 19:07:28 +01007 u_int8_t bsic;
Harald Weltef1dae192009-12-14 22:24:28 +01008 u_int16_t arfcn;
Harald Welte3c7dc6e2009-11-29 19:07:28 +01009};
10
11/* RX Level and RX Quality */
12struct gsm_rx_lev_qual {
13 u_int8_t rx_lev;
14 u_int8_t rx_qual;
15};
16
17/* unidirectional measumrement report */
18struct gsm_meas_rep_unidir {
19 struct gsm_rx_lev_qual full;
20 struct gsm_rx_lev_qual sub;
21};
22
23#define MEAS_REP_F_UL_DTX 0x01
24#define MEAS_REP_F_DL_VALID 0x02
25#define MEAS_REP_F_BA1 0x04
26#define MEAS_REP_F_DL_DTX 0x08
27#define MEAS_REP_F_MS_TO 0x10
28#define MEAS_REP_F_MS_L1 0x20
29#define MEAS_REP_F_FPC 0x40
30
31/* parsed uplink and downlink measurement result */
32struct gsm_meas_rep {
Harald Welte7f2d25b2009-12-15 21:36:59 +010033 /* back-pointer to the logical channel */
Harald Weltedbb1d882009-11-30 19:16:47 +010034 struct gsm_lchan *lchan;
35
Harald Welte7f2d25b2009-12-15 21:36:59 +010036 /* number of the measurement report */
Harald Welte3c7dc6e2009-11-29 19:07:28 +010037 u_int8_t nr;
Harald Welte7f2d25b2009-12-15 21:36:59 +010038 /* flags, see MEAS_REP_F_* */
Harald Welte3c7dc6e2009-11-29 19:07:28 +010039 unsigned int flags;
40
Harald Welte7f2d25b2009-12-15 21:36:59 +010041 /* uplink and downlink rxlev, rxqual; full and sub */
Harald Welte3c7dc6e2009-11-29 19:07:28 +010042 struct gsm_meas_rep_unidir ul;
43 struct gsm_meas_rep_unidir dl;
44
45 u_int8_t bs_power;
46 u_int8_t ms_timing_offset;
47 struct {
48 int8_t pwr; /* MS power in dBm */
49 u_int8_t ta; /* MS timing advance */
50 } ms_l1;
51
Harald Welte7f2d25b2009-12-15 21:36:59 +010052 /* neighbor measurement reports for up to 6 cells */
Harald Welte3c7dc6e2009-11-29 19:07:28 +010053 int num_cell;
54 struct gsm_meas_rep_cell cell[6];
55};
56
57#endif /* _MEAS_REP_H */