blob: 8f8585c86f8e54e3348268f92d9d35c71126bf35 [file] [log] [blame]
Harald Welte0442fea2017-01-20 12:04:10 +01001#pragma once
2
3#include <stdint.h>
4
5struct gprs_air_if_summary {
6 uint32_t fn;
7 uint8_t band_ind;
8 uint8_t dl_ts;
9 uint8_t ul_ts;
10 uint16_t rx_power;
11 uint8_t tx_power_ts[4];
12 uint8_t ta;
13 uint32_t rlc_dl_rx;
14 uint32_t rlc_ul_tx;
15 uint32_t rlc_ul_retx;
16 uint32_t llpdu_tx_sum;
17 uint32_t llpdu_retx;
18 uint32_t llpdu_rx_sum;
19 uint32_t llpdu_rx_err;
20 uint32_t user_oct_dl;
21 uint32_t user_oct_ul;
22} __attribute__ ((packed));
23
24struct gprs_rx_msg_metr_a_v2 {
25 uint32_t fn;
26 uint8_t tn;
27 uint8_t chan;
28 uint8_t cs;
29 uint16_t rx_qual;
30 uint8_t _res:2,
31 crc_passed:1,
32 egprs_msg1_crc_passed:1,
33 egprs_msg2_crc_passed:1,
34 usf_match:1,
35 dl_tfi_match:1;
36 uint16_t msg_len;
37 uint8_t usf;
38 /* EGPRS specifics below */
39 uint8_t ir_status;
40 uint8_t mod_detected;
41 uint16_t blk_mean_bep_tslot;
42 uint16_t blk_cv_bep_tslot;
43 uint16_t filtered_cv_bep_tslot;
44 uint16_t reliability;
45} __attribute__ ((packed));
46
47struct gprs_xfer_sum {
48 uint8_t band_ind;
49 uint8_t current_alloc;
50 uint8_t ul_ptcch_ts;
51 uint8_t dl_ptcch_ts;
52 uint8_t ta;
53 uint8_t usf_granularity;
54 uint8_t ul_bitmap_tn;
55 uint8_t dl_bitmap_tn;
56} __attribute__ ((packed));
57
58struct gprs_power_control {
59 uint8_t tx_channel;
60 uint8_t tx_tn;
61 uint16_t tx_pwr;
62 uint8_t cs;
63 uint8_t gamma_tn;
64 uint16_t gamma_band;
65 uint8_t alpha;
66 uint8_t derived_c;
67 uint8_t pmax;
68} __attribute__ ((packed));
69
70enum gprs_tx_ul_chan_t {
71 DIAG_TX_UL_CH_T_PRACH,
72 DIAG_TX_UL_CH_T_UL_PTCCH,
73 DIAG_TX_UL_CH_T_UL_PACCH_PDTCH,
74};
Vadim Yanitskiy71226b12021-11-19 02:14:51 +030075extern const struct value_string gprs_tx_ul_chans[4];
Harald Welte0442fea2017-01-20 12:04:10 +010076
77enum gprs_coding_scheme {
78 DIAG_GPRS_CS_CS1,
79 DIAG_GPRS_CS_CS2,
80 DIAG_GPRS_CS_CS3,
81 DIAG_GPRS_CS_CS4,
82 DIAG_GPRS_CS_ACCESS,
83 DIAG_GPRS_CS_EXT_ACCESS,
84 DIAG_GPRS_CS_MCS1,
85 DIAG_GPRS_CS_MCS2,
86 DIAG_GPRS_CS_MCS3,
87 DIAG_GPRS_CS_MCS4,
88 DIAG_GPRS_CS_MCS5,
89 DIAG_GPRS_CS_MCS6,
90 DIAG_GPRS_CS_MCS7,
91 DIAG_GPRS_CS_MCS8,
92 DIAG_GPRS_CS_MCS9,
93};
Vadim Yanitskiy71226b12021-11-19 02:14:51 +030094extern const struct value_string gprs_coding_schemes[16];
Harald Welte0442fea2017-01-20 12:04:10 +010095
96struct gprs_tx_sched_res {
97 uint32_t fn;
98 uint8_t num_msg_tx;
99 uint16_t arfcn[4];
100 struct {
101 uint8_t tn;
102 uint8_t chan_type; /* gprs_tx_ul_chan_t */
103 uint8_t dyn_alloc;
104 int16_t power_idx;
105 uint8_t ta;
106 uint8_t cs;
107 } msg_info[4];
108} __attribute__ ((packed));