e10888f3e361bdbde87719aa60ec4ad42ebd7db2
[osmocom-bb.git] / src / host / layer23 / include / osmocom / bb / mobile / support.h
1 #ifndef _SUPPORT_H
2 #define _SUPPORT_H
3
4 #define GSM_CIPHER_A5_1         0
5 #define GSM_CIPHER_A5_2         1
6 #define GSM_CIPHER_A5_3         2
7 #define GSM_CIPHER_A5_4         3
8 #define GSM_CIPHER_A5_5         4
9 #define GSM_CIPHER_A5_6         5
10 #define GSM_CIPHER_A5_7         6
11 #define GSM_CIPHER_RESERVED     7
12
13 #define GSM_CAP_SDCCH           0
14 #define GSM_CAP_SDCCH_TCHF      1
15 #define GSM_CAP_SDCCH_TCHF_TCHH 2
16
17 struct gsm_support {
18         struct osmocom_ms *ms;
19
20         /* rf power capability */
21         uint8_t pwr_lev_900; /* and < 900 */
22         uint8_t pwr_lev_1800; /* DCS and PCS */
23         /* controlled early classmark sending */
24         uint8_t es_ind;
25         /* revision level */
26         uint8_t rev_lev;
27         /* support of VGCS */
28         uint8_t vgcs;
29         /* support of VBS */
30         uint8_t vbs;
31         /* support of SMS */
32         uint8_t sms_ptp;
33         /* screening indicator */
34         uint8_t ss_ind;
35         /* pseudo synchronised capability */
36         uint8_t ps_cap;
37         /* CM service prompt */
38         uint8_t cmsp;
39         /* solsa support */
40         uint8_t solsa;
41         /* location service support */
42         uint8_t lcsva;
43         /* codec supprot */
44         uint8_t a5_1;
45         uint8_t a5_2;
46         uint8_t a5_3;
47         uint8_t a5_4;
48         uint8_t a5_5;
49         uint8_t a5_6;
50         uint8_t a5_7;
51         /* radio support */
52         uint8_t p_gsm;
53         uint8_t e_gsm;
54         uint8_t r_gsm;
55         uint8_t r_capa;
56         uint8_t low_capa;
57         uint8_t dcs_1800;
58         uint8_t dcs_capa;
59         uint8_t freq_map[128];
60         /* multi slot support */
61         uint8_t ms_sup;
62         /* ucs2 treatment */
63         uint8_t ucs2_treat;
64         /* support extended measurements */
65         uint8_t ext_meas;
66         /* support switched measurement capability */
67         uint8_t meas_cap;
68         uint8_t sms_val;
69         uint8_t sm_val;
70         /* positioning method capability */
71         uint8_t loc_serv;
72         uint8_t e_otd_ass;
73         uint8_t e_otd_based;
74         uint8_t gps_ass;
75         uint8_t gps_based;
76         uint8_t gps_conv;
77
78         /* radio */
79         uint8_t ch_cap; /* channel capability */
80         int8_t min_rxlev_db;
81         uint8_t scan_to;
82         uint8_t sync_to;
83
84         /* codecs */
85         uint8_t full_v1;
86         uint8_t full_v2;
87         uint8_t full_v3;
88         uint8_t half_v1;
89         uint8_t half_v3;
90 };
91
92 struct gsm_support_scan_max {
93         uint16_t        start;
94         uint16_t        end;
95         uint16_t        max;
96         uint16_t        temp;   
97 };
98 extern struct gsm_support_scan_max gsm_sup_smax[];
99
100 void gsm_support_init(struct osmocom_ms *ms);
101 void gsm_support_dump(struct gsm_support *sup,
102                         void (*print)(void *, const char *, ...), void *priv);
103
104 #endif /* _SUPPORT_H */
105