1 /* Messages to be sent between the different layers */
3 /* (C) 2010 by Harald Welte <laforge@gnumonks.org>
4 * (C) 2010 by Holger Hans Peter Freyther
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License along
19 * with this program; if not, write to the Free Software Foundation, Inc.,
20 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24 #ifndef __L1CTL_PROTO_H__
25 #define __L1CTL_PROTO_H__
36 L1CTL_PM_REQ
, /* power measurement */
37 L1CTL_PM_CONF
, /* power measurement */
60 CCCH_MODE_NON_COMBINED
,
71 * NOTE: struct size. We do add manual padding out of the believe
72 * that it will avoid some unaligned access.
75 /* there are no more messages in a sequence */
76 #define L1CTL_F_DONE 0x01
83 } __attribute__((packed
));
86 * downlink info ... down from the BTS..
88 struct l1ctl_info_dl
{
89 /* GSM 08.58 channel number (9.3.1) */
91 /* GSM 08.58 link identifier (9.3.2) */
93 /* the ARFCN and the band. FIXME: what about MAIO? */
98 uint8_t rx_level
; /* 0 .. 63 in typical GSM notation (dBm+110) */
99 uint8_t snr
; /* Signal/Noise Ration (dB) */
104 } __attribute__((packed
));
106 /* new CCCH was found. This is following the header */
107 struct l1ctl_fbsb_conf
{
108 int16_t initial_freq_err
;
111 /* FIXME: contents of cell_info ? */
112 } __attribute__((packed
));
114 /* CCCH mode was changed */
115 struct l1ctl_ccch_mode_conf
{
116 uint8_t ccch_mode
; /* enum ccch_mode */
118 } __attribute__((packed
));
120 /* TCH mode was changed */
121 struct l1ctl_tch_mode_conf
{
122 uint8_t tch_mode
; /* enum tch_mode */
124 } __attribute__((packed
));
126 /* data on the CCCH was found. This is following the header */
127 struct l1ctl_data_ind
{
129 } __attribute__((packed
));
134 struct l1ctl_info_ul
{
135 /* GSM 08.58 channel number (9.3.1) */
137 /* GSM 08.58 link identifier (9.3.2) */
142 } __attribute__((packed
));
146 * the l1_info_ul header is in front
148 struct l1ctl_fbsb_req
{
150 uint16_t timeout
; /* in TDMA frames */
152 uint16_t freq_err_thresh1
;
153 uint16_t freq_err_thresh2
;
155 uint8_t num_freqerr_avg
;
156 uint8_t flags
; /* L1CTL_FBSB_F_* */
157 uint8_t sync_info_idx
;
158 uint8_t ccch_mode
; /* enum ccch_mode */
159 } __attribute__((packed
));
161 #define L1CTL_FBSB_F_FB0 (1 << 0)
162 #define L1CTL_FBSB_F_FB1 (1 << 1)
163 #define L1CTL_FBSB_F_SB (1 << 2)
164 #define L1CTL_FBSB_F_FB01SB (L1CTL_FBSB_F_FB0|L1CTL_FBSB_F_FB1|L1CTL_FBSB_F_SB)
167 * msg for CCCH_MODE_REQ
168 * the l1_info_ul header is in front
170 struct l1ctl_ccch_mode_req
{
171 uint8_t ccch_mode
; /* enum ccch_mode */
173 } __attribute__((packed
));
176 * msg for TCH_MODE_REQ
177 * the l1_info_ul header is in front
179 struct l1ctl_tch_mode_req
{
180 uint8_t tch_mode
; /* enum gsm48_chan_mode */
182 } __attribute__((packed
));
184 /* the l1_info_ul header is in front */
185 struct l1ctl_rach_req
{
189 } __attribute__((packed
));
191 /* the l1_info_ul header is in front */
192 struct l1ctl_par_req
{
196 } __attribute__((packed
));
200 } __attribute__((packed
));
208 } __attribute__((packed
));
210 struct l1ctl_dm_est_req
{
219 } __attribute__((packed
));
221 struct l1ctl_dm_freq_req
{
229 } __attribute__((packed
));
231 struct l1ctl_crypto_req
{
234 } __attribute__((packed
));
236 struct l1ctl_pm_req
{
242 uint16_t band_arfcn_from
;
243 uint16_t band_arfcn_to
;
246 } __attribute__((packed
));
248 /* a single L1CTL_PM response */
249 struct l1ctl_pm_conf
{
252 } __attribute__((packed
));
254 enum l1ctl_reset_type
{
255 L1CTL_RES_T_BOOT
, /* only _IND */
260 /* argument to L1CTL_RESET_REQ and L1CTL_RESET_IND */
264 } __attribute__((packed
));
266 struct l1ctl_neigh_pm_req
{
269 uint16_t band_arfcn
[64];
270 } __attribute__((packed
));
272 /* neighbour cell measurement results */
273 struct l1ctl_neigh_pm_ind
{
276 } __attribute__((packed
));
278 #endif /* __L1CTL_PROTO_H__ */