trxcon: use 3GPP TS 45.002 definitions from libosmogsm
[osmocom-bb.git] / src / host / trxcon / src / sched_lchan_desc.c
blobe5f85b4bcf66c5a003cecbd993b373ff16ddb24f
1 /*
2 * OsmocomBB <-> SDR connection bridge
3 * TDMA scheduler: logical channels, RX / TX handlers
5 * (C) 2013 by Andreas Eversberg <jolly@eversberg.eu>
6 * (C) 2015 by Alexander Chemeris <Alexander.Chemeris@fairwaves.co>
7 * (C) 2015 by Harald Welte <laforge@gnumonks.org>
8 * Contributions by sysmocom - s.f.m.c. GmbH
10 * All Rights Reserved
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU Affero General Public License as published by
14 * the Free Software Foundation; either version 3 of the License, or
15 * (at your option) any later version.
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU Affero General Public License
23 * along with this program. If not, see <http://www.gnu.org/licenses/>.
27 #include <osmocom/gsm/protocol/gsm_08_58.h>
28 #include <osmocom/core/gsmtap.h>
30 #include <osmocom/bb/l1sched/l1sched.h>
32 /* Forward declaration of handlers */
33 int rx_data_fn(struct l1sched_lchan_state *lchan,
34 const struct l1sched_burst_ind *bi);
36 int tx_data_fn(struct l1sched_lchan_state *lchan,
37 struct l1sched_burst_req *br);
39 int rx_sch_fn(struct l1sched_lchan_state *lchan,
40 const struct l1sched_burst_ind *bi);
42 int tx_rach_fn(struct l1sched_lchan_state *lchan,
43 struct l1sched_burst_req *br);
45 int rx_tchf_fn(struct l1sched_lchan_state *lchan,
46 const struct l1sched_burst_ind *bi);
48 int tx_tchf_fn(struct l1sched_lchan_state *lchan,
49 struct l1sched_burst_req *br);
51 int rx_tchh_fn(struct l1sched_lchan_state *lchan,
52 const struct l1sched_burst_ind *bi);
54 int tx_tchh_fn(struct l1sched_lchan_state *lchan,
55 struct l1sched_burst_req *br);
57 int rx_pdtch_fn(struct l1sched_lchan_state *lchan,
58 const struct l1sched_burst_ind *bi);
60 int tx_pdtch_fn(struct l1sched_lchan_state *lchan,
61 struct l1sched_burst_req *br);
63 const struct l1sched_lchan_desc l1sched_lchan_desc[_L1SCHED_CHAN_MAX] = {
64 [L1SCHED_IDLE] = {
65 .name = "IDLE",
66 .desc = "Idle channel",
67 /* The MS needs to perform neighbour measurements during
68 * IDLE slots, however this is not implemented (yet). */
70 [L1SCHED_FCCH] = {
71 .name = "FCCH", /* 3GPP TS 05.02, section 3.3.2.1 */
72 .desc = "Frequency correction channel",
73 /* Handled by transceiver, nothing to do. */
75 [L1SCHED_SCH] = {
76 .name = "SCH", /* 3GPP TS 05.02, section 3.3.2.2 */
77 .desc = "Synchronization channel",
79 /* 3GPP TS 05.03, section 4.7. Handled by transceiver,
80 * however we still need to parse BSIC (BCC / NCC). */
81 .flags = L1SCHED_CH_FLAG_AUTO,
82 .rx_fn = rx_sch_fn,
84 [L1SCHED_BCCH] = {
85 .name = "BCCH", /* 3GPP TS 05.02, section 3.3.2.3 */
86 .desc = "Broadcast control channel",
87 .gsmtap_chan_type = GSMTAP_CHANNEL_BCCH,
88 .chan_nr = RSL_CHAN_BCCH,
90 /* Rx only, xCCH convolutional coding (3GPP TS 05.03, section 4.4),
91 * regular interleaving (3GPP TS 05.02, clause 7, table 3):
92 * a L2 frame is interleaved over 4 consecutive bursts. */
93 .burst_buf_size = 4 * GSM_NBITS_NB_GMSK_PAYLOAD,
94 .flags = L1SCHED_CH_FLAG_AUTO,
95 .rx_fn = rx_data_fn,
97 [L1SCHED_RACH] = {
98 .name = "RACH", /* 3GPP TS 05.02, section 3.3.3.1 */
99 .desc = "Random access channel",
100 .gsmtap_chan_type = GSMTAP_CHANNEL_RACH,
101 .chan_nr = RSL_CHAN_RACH,
103 /* Tx only, RACH convolutional coding (3GPP TS 05.03, section 4.6). */
104 .flags = L1SCHED_CH_FLAG_AUTO,
105 .tx_fn = tx_rach_fn,
107 [L1SCHED_CCCH] = {
108 .name = "CCCH", /* 3GPP TS 05.02, section 3.3.3.1 */
109 .desc = "Common control channel",
110 .gsmtap_chan_type = GSMTAP_CHANNEL_CCCH,
111 .chan_nr = RSL_CHAN_PCH_AGCH,
113 /* Rx only, xCCH convolutional coding (3GPP TS 05.03, section 4.4),
114 * regular interleaving (3GPP TS 05.02, clause 7, table 3):
115 * a L2 frame is interleaved over 4 consecutive bursts. */
116 .burst_buf_size = 4 * GSM_NBITS_NB_GMSK_PAYLOAD,
117 .flags = L1SCHED_CH_FLAG_AUTO,
118 .rx_fn = rx_data_fn,
120 [L1SCHED_TCHF] = {
121 .name = "TCH/F", /* 3GPP TS 05.02, section 3.2 */
122 .desc = "Full Rate traffic channel",
123 .gsmtap_chan_type = GSMTAP_CHANNEL_TCH_F,
124 .chan_nr = RSL_CHAN_Bm_ACCHs,
125 .link_id = L1SCHED_CH_LID_DEDIC,
127 /* Rx and Tx, multiple convolutional coding types (3GPP TS 05.03,
128 * chapter 3), block diagonal interleaving (3GPP TS 05.02, clause 7):
130 * - a traffic frame is interleaved over 8 consecutive bursts
131 * using the even numbered bits of the first 4 bursts
132 * and odd numbered bits of the last 4 bursts;
133 * - a FACCH/F frame 'steals' (replaces) one traffic frame,
134 * interleaving is done in the same way.
136 * The MS shall continuously transmit bursts, even if there is nothing
137 * to send, unless DTX (Discontinuous Transmission) is used. */
138 .burst_buf_size = 8 * GSM_NBITS_NB_GMSK_PAYLOAD,
139 .flags = L1SCHED_CH_FLAG_CBTX,
140 .rx_fn = rx_tchf_fn,
141 .tx_fn = tx_tchf_fn,
143 [L1SCHED_TCHH_0] = {
144 .name = "TCH/H(0)", /* 3GPP TS 05.02, section 3.2 */
145 .desc = "Half Rate traffic channel (sub-channel 0)",
146 .gsmtap_chan_type = GSMTAP_CHANNEL_TCH_H,
147 .chan_nr = RSL_CHAN_Lm_ACCHs + (0 << 3),
148 .link_id = L1SCHED_CH_LID_DEDIC,
149 .ss_nr = 0,
151 /* Rx and Tx, multiple convolutional coding types (3GPP TS 05.03,
152 * chapter 3), block diagonal interleaving (3GPP TS 05.02, clause 7):
154 * - a traffic frame is interleaved over 4 non-consecutive bursts
155 * using the even numbered bits of the first 2 bursts,
156 * and odd numbered bits of the last 2 bursts;
157 * - a FACCH/H frame is interleaved over 6 non-consecutive bursts
158 * using the even numbered bits of the first 2 bursts,
159 * all bits of the middle two 2 bursts,
160 * and odd numbered bits of the last 2 bursts;
161 * - a FACCH/H frame 'steals' (replaces) two traffic frames,
162 * interleaving is done over 4 consecutive bursts,
163 * the same as given for a TCH/FS.
165 * The MS shall continuously transmit bursts, even if there is nothing
166 * to send, unless DTX (Discontinuous Transmission) is used. */
167 .burst_buf_size = 6 * GSM_NBITS_NB_GMSK_PAYLOAD,
168 .flags = L1SCHED_CH_FLAG_CBTX,
169 .rx_fn = rx_tchh_fn,
170 .tx_fn = tx_tchh_fn,
172 [L1SCHED_TCHH_1] = {
173 .name = "TCH/H(1)", /* 3GPP TS 05.02, section 3.2 */
174 .desc = "Half Rate traffic channel (sub-channel 1)",
175 .gsmtap_chan_type = GSMTAP_CHANNEL_TCH_H,
176 .chan_nr = RSL_CHAN_Lm_ACCHs + (1 << 3),
177 .link_id = L1SCHED_CH_LID_DEDIC,
178 .ss_nr = 1,
180 /* Same as for L1SCHED_TCHH_0, see above. */
181 .burst_buf_size = 6 * GSM_NBITS_NB_GMSK_PAYLOAD,
182 .flags = L1SCHED_CH_FLAG_CBTX,
183 .rx_fn = rx_tchh_fn,
184 .tx_fn = tx_tchh_fn,
186 [L1SCHED_SDCCH4_0] = {
187 .name = "SDCCH/4(0)", /* 3GPP TS 05.02, section 3.3.4.1 */
188 .desc = "Stand-alone dedicated control channel (sub-channel 0)",
189 .gsmtap_chan_type = GSMTAP_CHANNEL_SDCCH4,
190 .chan_nr = RSL_CHAN_SDCCH4_ACCH + (0 << 3),
191 .link_id = L1SCHED_CH_LID_DEDIC,
192 .ss_nr = 0,
194 /* Same as for L1SCHED_BCCH (xCCH), see above. */
195 .burst_buf_size = 4 * GSM_NBITS_NB_GMSK_PAYLOAD,
196 .flags = L1SCHED_CH_FLAG_CBTX,
197 .rx_fn = rx_data_fn,
198 .tx_fn = tx_data_fn,
200 [L1SCHED_SDCCH4_1] = {
201 .name = "SDCCH/4(1)", /* 3GPP TS 05.02, section 3.3.4.1 */
202 .desc = "Stand-alone dedicated control channel (sub-channel 1)",
203 .gsmtap_chan_type = GSMTAP_CHANNEL_SDCCH4,
204 .chan_nr = RSL_CHAN_SDCCH4_ACCH + (1 << 3),
205 .link_id = L1SCHED_CH_LID_DEDIC,
206 .ss_nr = 1,
208 /* Same as for L1SCHED_BCCH (xCCH), see above. */
209 .burst_buf_size = 4 * GSM_NBITS_NB_GMSK_PAYLOAD,
210 .flags = L1SCHED_CH_FLAG_CBTX,
211 .rx_fn = rx_data_fn,
212 .tx_fn = tx_data_fn,
214 [L1SCHED_SDCCH4_2] = {
215 .name = "SDCCH/4(2)", /* 3GPP TS 05.02, section 3.3.4.1 */
216 .desc = "Stand-alone dedicated control channel (sub-channel 2)",
217 .gsmtap_chan_type = GSMTAP_CHANNEL_SDCCH4,
218 .chan_nr = RSL_CHAN_SDCCH4_ACCH + (2 << 3),
219 .link_id = L1SCHED_CH_LID_DEDIC,
220 .ss_nr = 2,
222 /* Same as for L1SCHED_BCCH (xCCH), see above. */
223 .burst_buf_size = 4 * GSM_NBITS_NB_GMSK_PAYLOAD,
224 .flags = L1SCHED_CH_FLAG_CBTX,
225 .rx_fn = rx_data_fn,
226 .tx_fn = tx_data_fn,
228 [L1SCHED_SDCCH4_3] = {
229 .name = "SDCCH/4(3)", /* 3GPP TS 05.02, section 3.3.4.1 */
230 .desc = "Stand-alone dedicated control channel (sub-channel 3)",
231 .gsmtap_chan_type = GSMTAP_CHANNEL_SDCCH4,
232 .chan_nr = RSL_CHAN_SDCCH4_ACCH + (3 << 3),
233 .link_id = L1SCHED_CH_LID_DEDIC,
234 .ss_nr = 3,
236 /* Same as for L1SCHED_BCCH (xCCH), see above. */
237 .burst_buf_size = 4 * GSM_NBITS_NB_GMSK_PAYLOAD,
238 .flags = L1SCHED_CH_FLAG_CBTX,
239 .rx_fn = rx_data_fn,
240 .tx_fn = tx_data_fn,
242 [L1SCHED_SDCCH8_0] = {
243 .name = "SDCCH/8(0)", /* 3GPP TS 05.02, section 3.3.4.1 */
244 .desc = "Stand-alone dedicated control channel (sub-channel 0)",
245 .gsmtap_chan_type = GSMTAP_CHANNEL_SDCCH8,
246 .chan_nr = RSL_CHAN_SDCCH8_ACCH + (0 << 3),
247 .link_id = L1SCHED_CH_LID_DEDIC,
248 .ss_nr = 0,
250 /* Same as for L1SCHED_BCCH and L1SCHED_SDCCH4_* (xCCH), see above. */
251 .burst_buf_size = 4 * GSM_NBITS_NB_GMSK_PAYLOAD,
252 .flags = L1SCHED_CH_FLAG_CBTX,
253 .rx_fn = rx_data_fn,
254 .tx_fn = tx_data_fn,
256 [L1SCHED_SDCCH8_1] = {
257 .name = "SDCCH/8(1)", /* 3GPP TS 05.02, section 3.3.4.1 */
258 .desc = "Stand-alone dedicated control channel (sub-channel 1)",
259 .gsmtap_chan_type = GSMTAP_CHANNEL_SDCCH8,
260 .chan_nr = RSL_CHAN_SDCCH8_ACCH + (1 << 3),
261 .link_id = L1SCHED_CH_LID_DEDIC,
262 .ss_nr = 1,
264 /* Same as for L1SCHED_BCCH and L1SCHED_SDCCH4_* (xCCH), see above. */
265 .burst_buf_size = 4 * GSM_NBITS_NB_GMSK_PAYLOAD,
266 .flags = L1SCHED_CH_FLAG_CBTX,
267 .rx_fn = rx_data_fn,
268 .tx_fn = tx_data_fn,
270 [L1SCHED_SDCCH8_2] = {
271 .name = "SDCCH/8(2)", /* 3GPP TS 05.02, section 3.3.4.1 */
272 .desc = "Stand-alone dedicated control channel (sub-channel 2)",
273 .gsmtap_chan_type = GSMTAP_CHANNEL_SDCCH8,
274 .chan_nr = RSL_CHAN_SDCCH8_ACCH + (2 << 3),
275 .link_id = L1SCHED_CH_LID_DEDIC,
276 .ss_nr = 2,
278 /* Same as for L1SCHED_BCCH and L1SCHED_SDCCH4_* (xCCH), see above. */
279 .burst_buf_size = 4 * GSM_NBITS_NB_GMSK_PAYLOAD,
280 .flags = L1SCHED_CH_FLAG_CBTX,
281 .rx_fn = rx_data_fn,
282 .tx_fn = tx_data_fn,
284 [L1SCHED_SDCCH8_3] = {
285 .name = "SDCCH/8(3)", /* 3GPP TS 05.02, section 3.3.4.1 */
286 .desc = "Stand-alone dedicated control channel (sub-channel 3)",
287 .gsmtap_chan_type = GSMTAP_CHANNEL_SDCCH8,
288 .chan_nr = RSL_CHAN_SDCCH8_ACCH + (3 << 3),
289 .link_id = L1SCHED_CH_LID_DEDIC,
290 .ss_nr = 3,
292 /* Same as for L1SCHED_BCCH and L1SCHED_SDCCH4_* (xCCH), see above. */
293 .burst_buf_size = 4 * GSM_NBITS_NB_GMSK_PAYLOAD,
294 .flags = L1SCHED_CH_FLAG_CBTX,
295 .rx_fn = rx_data_fn,
296 .tx_fn = tx_data_fn,
298 [L1SCHED_SDCCH8_4] = {
299 .name = "SDCCH/8(4)", /* 3GPP TS 05.02, section 3.3.4.1 */
300 .desc = "Stand-alone dedicated control channel (sub-channel 4)",
301 .gsmtap_chan_type = GSMTAP_CHANNEL_SDCCH8,
302 .chan_nr = RSL_CHAN_SDCCH8_ACCH + (4 << 3),
303 .link_id = L1SCHED_CH_LID_DEDIC,
304 .ss_nr = 4,
306 /* Same as for L1SCHED_BCCH and L1SCHED_SDCCH4_* (xCCH), see above. */
307 .burst_buf_size = 4 * GSM_NBITS_NB_GMSK_PAYLOAD,
308 .flags = L1SCHED_CH_FLAG_CBTX,
309 .rx_fn = rx_data_fn,
310 .tx_fn = tx_data_fn,
312 [L1SCHED_SDCCH8_5] = {
313 .name = "SDCCH/8(5)", /* 3GPP TS 05.02, section 3.3.4.1 */
314 .desc = "Stand-alone dedicated control channel (sub-channel 5)",
315 .gsmtap_chan_type = GSMTAP_CHANNEL_SDCCH8,
316 .chan_nr = RSL_CHAN_SDCCH8_ACCH + (5 << 3),
317 .link_id = L1SCHED_CH_LID_DEDIC,
318 .ss_nr = 5,
320 /* Same as for L1SCHED_BCCH and L1SCHED_SDCCH4_* (xCCH), see above. */
321 .burst_buf_size = 4 * GSM_NBITS_NB_GMSK_PAYLOAD,
322 .flags = L1SCHED_CH_FLAG_CBTX,
323 .rx_fn = rx_data_fn,
324 .tx_fn = tx_data_fn,
326 [L1SCHED_SDCCH8_6] = {
327 .name = "SDCCH/8(6)", /* 3GPP TS 05.02, section 3.3.4.1 */
328 .desc = "Stand-alone dedicated control channel (sub-channel 6)",
329 .gsmtap_chan_type = GSMTAP_CHANNEL_SDCCH8,
330 .chan_nr = RSL_CHAN_SDCCH8_ACCH + (6 << 3),
331 .link_id = L1SCHED_CH_LID_DEDIC,
332 .ss_nr = 6,
334 /* Same as for L1SCHED_BCCH and L1SCHED_SDCCH4_* (xCCH), see above. */
335 .burst_buf_size = 4 * GSM_NBITS_NB_GMSK_PAYLOAD,
336 .flags = L1SCHED_CH_FLAG_CBTX,
337 .rx_fn = rx_data_fn,
338 .tx_fn = tx_data_fn,
340 [L1SCHED_SDCCH8_7] = {
341 .name = "SDCCH/8(7)", /* 3GPP TS 05.02, section 3.3.4.1 */
342 .desc = "Stand-alone dedicated control channel (sub-channel 7)",
343 .gsmtap_chan_type = GSMTAP_CHANNEL_SDCCH8,
344 .chan_nr = RSL_CHAN_SDCCH8_ACCH + (7 << 3),
345 .link_id = L1SCHED_CH_LID_DEDIC,
346 .ss_nr = 7,
348 /* Same as for L1SCHED_BCCH and L1SCHED_SDCCH4_* (xCCH), see above. */
349 .burst_buf_size = 4 * GSM_NBITS_NB_GMSK_PAYLOAD,
350 .flags = L1SCHED_CH_FLAG_CBTX,
351 .rx_fn = rx_data_fn,
352 .tx_fn = tx_data_fn,
354 [L1SCHED_SACCHTF] = {
355 .name = "SACCH/TF", /* 3GPP TS 05.02, section 3.3.4.1 */
356 .desc = "Slow TCH/F associated control channel",
357 .gsmtap_chan_type = GSMTAP_CHANNEL_TCH_F | GSMTAP_CHANNEL_ACCH,
358 .chan_nr = RSL_CHAN_Bm_ACCHs,
359 .link_id = L1SCHED_CH_LID_SACCH,
361 /* Same as for L1SCHED_BCCH (xCCH), see above. */
362 .burst_buf_size = 4 * GSM_NBITS_NB_GMSK_PAYLOAD,
363 .flags = L1SCHED_CH_FLAG_CBTX,
364 .rx_fn = rx_data_fn,
365 .tx_fn = tx_data_fn,
367 [L1SCHED_SACCHTH_0] = {
368 .name = "SACCH/TH(0)", /* 3GPP TS 05.02, section 3.3.4.1 */
369 .desc = "Slow TCH/H associated control channel (sub-channel 0)",
370 .gsmtap_chan_type = GSMTAP_CHANNEL_TCH_H | GSMTAP_CHANNEL_ACCH,
371 .chan_nr = RSL_CHAN_Lm_ACCHs + (0 << 3),
372 .link_id = L1SCHED_CH_LID_SACCH,
373 .ss_nr = 0,
375 /* Same as for L1SCHED_BCCH (xCCH), see above. */
376 .burst_buf_size = 4 * GSM_NBITS_NB_GMSK_PAYLOAD,
377 .flags = L1SCHED_CH_FLAG_CBTX,
378 .rx_fn = rx_data_fn,
379 .tx_fn = tx_data_fn,
381 [L1SCHED_SACCHTH_1] = {
382 .name = "SACCH/TH(1)", /* 3GPP TS 05.02, section 3.3.4.1 */
383 .desc = "Slow TCH/H associated control channel (sub-channel 1)",
384 .gsmtap_chan_type = GSMTAP_CHANNEL_TCH_H | GSMTAP_CHANNEL_ACCH,
385 .chan_nr = RSL_CHAN_Lm_ACCHs + (1 << 3),
386 .link_id = L1SCHED_CH_LID_SACCH,
387 .ss_nr = 1,
389 /* Same as for L1SCHED_BCCH (xCCH), see above. */
390 .burst_buf_size = 4 * GSM_NBITS_NB_GMSK_PAYLOAD,
391 .flags = L1SCHED_CH_FLAG_CBTX,
392 .rx_fn = rx_data_fn,
393 .tx_fn = tx_data_fn,
395 [L1SCHED_SACCH4_0] = {
396 .name = "SACCH/4(0)", /* 3GPP TS 05.02, section 3.3.4.1 */
397 .desc = "Slow SDCCH/4 associated control channel (sub-channel 0)",
398 .gsmtap_chan_type = GSMTAP_CHANNEL_SDCCH4 | GSMTAP_CHANNEL_ACCH,
399 .chan_nr = RSL_CHAN_SDCCH4_ACCH + (0 << 3),
400 .link_id = L1SCHED_CH_LID_SACCH,
401 .ss_nr = 0,
403 /* Same as for L1SCHED_BCCH and L1SCHED_SDCCH4_* (xCCH), see above. */
404 .burst_buf_size = 4 * GSM_NBITS_NB_GMSK_PAYLOAD,
405 .flags = L1SCHED_CH_FLAG_CBTX,
406 .rx_fn = rx_data_fn,
407 .tx_fn = tx_data_fn,
409 [L1SCHED_SACCH4_1] = {
410 .name = "SACCH/4(1)", /* 3GPP TS 05.02, section 3.3.4.1 */
411 .desc = "Slow SDCCH/4 associated control channel (sub-channel 1)",
412 .gsmtap_chan_type = GSMTAP_CHANNEL_SDCCH4 | GSMTAP_CHANNEL_ACCH,
413 .chan_nr = RSL_CHAN_SDCCH4_ACCH + (1 << 3),
414 .link_id = L1SCHED_CH_LID_SACCH,
415 .ss_nr = 1,
417 /* Same as for L1SCHED_BCCH and L1SCHED_SDCCH4_* (xCCH), see above. */
418 .burst_buf_size = 4 * GSM_NBITS_NB_GMSK_PAYLOAD,
419 .flags = L1SCHED_CH_FLAG_CBTX,
420 .rx_fn = rx_data_fn,
421 .tx_fn = tx_data_fn,
423 [L1SCHED_SACCH4_2] = {
424 .name = "SACCH/4(2)", /* 3GPP TS 05.02, section 3.3.4.1 */
425 .desc = "Slow SDCCH/4 associated control channel (sub-channel 2)",
426 .gsmtap_chan_type = GSMTAP_CHANNEL_SDCCH4 | GSMTAP_CHANNEL_ACCH,
427 .chan_nr = RSL_CHAN_SDCCH4_ACCH + (2 << 3),
428 .link_id = L1SCHED_CH_LID_SACCH,
429 .ss_nr = 2,
431 /* Same as for L1SCHED_BCCH and L1SCHED_SDCCH4_* (xCCH), see above. */
432 .burst_buf_size = 4 * GSM_NBITS_NB_GMSK_PAYLOAD,
433 .flags = L1SCHED_CH_FLAG_CBTX,
434 .rx_fn = rx_data_fn,
435 .tx_fn = tx_data_fn,
437 [L1SCHED_SACCH4_3] = {
438 .name = "SACCH/4(3)", /* 3GPP TS 05.02, section 3.3.4.1 */
439 .desc = "Slow SDCCH/4 associated control channel (sub-channel 3)",
440 .gsmtap_chan_type = GSMTAP_CHANNEL_SDCCH4 | GSMTAP_CHANNEL_ACCH,
441 .chan_nr = RSL_CHAN_SDCCH4_ACCH + (3 << 3),
442 .link_id = L1SCHED_CH_LID_SACCH,
443 .ss_nr = 3,
445 /* Same as for L1SCHED_BCCH and L1SCHED_SDCCH4_* (xCCH), see above. */
446 .burst_buf_size = 4 * GSM_NBITS_NB_GMSK_PAYLOAD,
447 .flags = L1SCHED_CH_FLAG_CBTX,
448 .rx_fn = rx_data_fn,
449 .tx_fn = tx_data_fn,
451 [L1SCHED_SACCH8_0] = {
452 .name = "SACCH/8(0)", /* 3GPP TS 05.02, section 3.3.4.1 */
453 .desc = "Slow SDCCH/8 associated control channel (sub-channel 0)",
454 .gsmtap_chan_type = GSMTAP_CHANNEL_SDCCH8 | GSMTAP_CHANNEL_ACCH,
455 .chan_nr = RSL_CHAN_SDCCH8_ACCH + (0 << 3),
456 .link_id = L1SCHED_CH_LID_SACCH,
457 .ss_nr = 0,
459 /* Same as for L1SCHED_BCCH and L1SCHED_SDCCH8_* (xCCH), see above. */
460 .burst_buf_size = 4 * GSM_NBITS_NB_GMSK_PAYLOAD,
461 .flags = L1SCHED_CH_FLAG_CBTX,
462 .rx_fn = rx_data_fn,
463 .tx_fn = tx_data_fn,
465 [L1SCHED_SACCH8_1] = {
466 .name = "SACCH/8(1)", /* 3GPP TS 05.02, section 3.3.4.1 */
467 .desc = "Slow SDCCH/8 associated control channel (sub-channel 1)",
468 .gsmtap_chan_type = GSMTAP_CHANNEL_SDCCH8 | GSMTAP_CHANNEL_ACCH,
469 .chan_nr = RSL_CHAN_SDCCH8_ACCH + (1 << 3),
470 .link_id = L1SCHED_CH_LID_SACCH,
471 .ss_nr = 1,
473 /* Same as for L1SCHED_BCCH and L1SCHED_SDCCH8_* (xCCH), see above. */
474 .burst_buf_size = 4 * GSM_NBITS_NB_GMSK_PAYLOAD,
475 .flags = L1SCHED_CH_FLAG_CBTX,
476 .rx_fn = rx_data_fn,
477 .tx_fn = tx_data_fn,
479 [L1SCHED_SACCH8_2] = {
480 .name = "SACCH/8(2)", /* 3GPP TS 05.02, section 3.3.4.1 */
481 .desc = "Slow SDCCH/8 associated control channel (sub-channel 2)",
482 .gsmtap_chan_type = GSMTAP_CHANNEL_SDCCH8 | GSMTAP_CHANNEL_ACCH,
483 .chan_nr = RSL_CHAN_SDCCH8_ACCH + (2 << 3),
484 .link_id = L1SCHED_CH_LID_SACCH,
485 .ss_nr = 2,
487 /* Same as for L1SCHED_BCCH and L1SCHED_SDCCH8_* (xCCH), see above. */
488 .burst_buf_size = 4 * GSM_NBITS_NB_GMSK_PAYLOAD,
489 .flags = L1SCHED_CH_FLAG_CBTX,
490 .rx_fn = rx_data_fn,
491 .tx_fn = tx_data_fn,
493 [L1SCHED_SACCH8_3] = {
494 .name = "SACCH/8(3)", /* 3GPP TS 05.02, section 3.3.4.1 */
495 .desc = "Slow SDCCH/8 associated control channel (sub-channel 3)",
496 .gsmtap_chan_type = GSMTAP_CHANNEL_SDCCH8 | GSMTAP_CHANNEL_ACCH,
497 .chan_nr = RSL_CHAN_SDCCH8_ACCH + (3 << 3),
498 .link_id = L1SCHED_CH_LID_SACCH,
499 .ss_nr = 3,
501 /* Same as for L1SCHED_BCCH and L1SCHED_SDCCH8_* (xCCH), see above. */
502 .burst_buf_size = 4 * GSM_NBITS_NB_GMSK_PAYLOAD,
503 .flags = L1SCHED_CH_FLAG_CBTX,
504 .rx_fn = rx_data_fn,
505 .tx_fn = tx_data_fn,
507 [L1SCHED_SACCH8_4] = {
508 .name = "SACCH/8(4)", /* 3GPP TS 05.02, section 3.3.4.1 */
509 .desc = "Slow SDCCH/8 associated control channel (sub-channel 4)",
510 .gsmtap_chan_type = GSMTAP_CHANNEL_SDCCH8 | GSMTAP_CHANNEL_ACCH,
511 .chan_nr = RSL_CHAN_SDCCH8_ACCH + (4 << 3),
512 .link_id = L1SCHED_CH_LID_SACCH,
513 .ss_nr = 4,
515 /* Same as for L1SCHED_BCCH and L1SCHED_SDCCH8_* (xCCH), see above. */
516 .burst_buf_size = 4 * GSM_NBITS_NB_GMSK_PAYLOAD,
517 .flags = L1SCHED_CH_FLAG_CBTX,
518 .rx_fn = rx_data_fn,
519 .tx_fn = tx_data_fn,
521 [L1SCHED_SACCH8_5] = {
522 .name = "SACCH/8(5)", /* 3GPP TS 05.02, section 3.3.4.1 */
523 .desc = "Slow SDCCH/8 associated control channel (sub-channel 5)",
524 .gsmtap_chan_type = GSMTAP_CHANNEL_SDCCH8 | GSMTAP_CHANNEL_ACCH,
525 .chan_nr = RSL_CHAN_SDCCH8_ACCH + (5 << 3),
526 .link_id = L1SCHED_CH_LID_SACCH,
527 .ss_nr = 5,
529 /* Same as for L1SCHED_BCCH and L1SCHED_SDCCH8_* (xCCH), see above. */
530 .burst_buf_size = 4 * GSM_NBITS_NB_GMSK_PAYLOAD,
531 .flags = L1SCHED_CH_FLAG_CBTX,
532 .rx_fn = rx_data_fn,
533 .tx_fn = tx_data_fn,
535 [L1SCHED_SACCH8_6] = {
536 .name = "SACCH/8(6)", /* 3GPP TS 05.02, section 3.3.4.1 */
537 .desc = "Slow SDCCH/8 associated control channel (sub-channel 6)",
538 .gsmtap_chan_type = GSMTAP_CHANNEL_SDCCH8 | GSMTAP_CHANNEL_ACCH,
539 .chan_nr = RSL_CHAN_SDCCH8_ACCH + (6 << 3),
540 .link_id = L1SCHED_CH_LID_SACCH,
541 .ss_nr = 6,
543 /* Same as for L1SCHED_BCCH and L1SCHED_SDCCH8_* (xCCH), see above. */
544 .burst_buf_size = 4 * GSM_NBITS_NB_GMSK_PAYLOAD,
545 .flags = L1SCHED_CH_FLAG_CBTX,
546 .rx_fn = rx_data_fn,
547 .tx_fn = tx_data_fn,
549 [L1SCHED_SACCH8_7] = {
550 .name = "SACCH/8(7)", /* 3GPP TS 05.02, section 3.3.4.1 */
551 .desc = "Slow SDCCH/8 associated control channel (sub-channel 7)",
552 .gsmtap_chan_type = GSMTAP_CHANNEL_SDCCH8 | GSMTAP_CHANNEL_ACCH,
553 .chan_nr = RSL_CHAN_SDCCH8_ACCH + (7 << 3),
554 .link_id = L1SCHED_CH_LID_SACCH,
555 .ss_nr = 7,
557 /* Same as for L1SCHED_BCCH and L1SCHED_SDCCH8_* (xCCH), see above. */
558 .burst_buf_size = 4 * GSM_NBITS_NB_GMSK_PAYLOAD,
559 .flags = L1SCHED_CH_FLAG_CBTX,
560 .rx_fn = rx_data_fn,
561 .tx_fn = tx_data_fn,
563 [L1SCHED_PDTCH] = {
564 .name = "PDTCH", /* 3GPP TS 05.02, sections 3.2.4, 3.3.2.4 */
565 .desc = "Packet data traffic & control channel",
566 .gsmtap_chan_type = GSMTAP_CHANNEL_PDTCH,
567 .chan_nr = RSL_CHAN_OSMO_PDCH,
569 /* Rx and Tx, multiple coding schemes: CS-1..4 and MCS-1..9 (3GPP TS
570 * 05.03, chapter 5), regular interleaving as specified for xCCH.
571 * NOTE: the burst buffer is three times bigger because the
572 * payload of EDGE bursts is three times longer. */
573 .burst_buf_size = 4 * GSM_NBITS_NB_8PSK_PAYLOAD,
574 .flags = L1SCHED_CH_FLAG_PDCH,
575 .rx_fn = rx_pdtch_fn,
576 .tx_fn = tx_pdtch_fn,
578 [L1SCHED_PTCCH] = {
579 .name = "PTCCH", /* 3GPP TS 05.02, section 3.3.4.2 */
580 .desc = "Packet Timing advance control channel",
581 .gsmtap_chan_type = GSMTAP_CHANNEL_PTCCH,
582 .chan_nr = RSL_CHAN_OSMO_PDCH,
583 .link_id = L1SCHED_CH_LID_PTCCH,
585 /* On the Uplink, mobile stations transmit random Access Bursts
586 * to allow estimation of the timing advance for one MS in packet
587 * transfer mode. On Downlink, the network sends timing advance
588 * updates for several mobile stations. The coding scheme used
589 * for PTCCH/D messages is the same as for PDTCH CS-1. */
590 .burst_buf_size = 4 * GSM_NBITS_NB_GMSK_PAYLOAD,
591 .flags = L1SCHED_CH_FLAG_PDCH,
592 .rx_fn = rx_pdtch_fn,
593 .tx_fn = tx_rach_fn,
595 [L1SCHED_SDCCH4_CBCH] = {
596 .name = "SDCCH/4(CBCH)", /* 3GPP TS 05.02, section 3.3.5 */
597 .desc = "Cell Broadcast channel on SDCCH/4",
598 .gsmtap_chan_type = GSMTAP_CHANNEL_CBCH51,
599 .chan_nr = RSL_CHAN_OSMO_CBCH4,
600 .ss_nr = 2,
602 /* Same as for L1SCHED_BCCH (xCCH), but Rx only. See above. */
603 .burst_buf_size = 4 * GSM_NBITS_NB_GMSK_PAYLOAD,
604 .flags = L1SCHED_CH_FLAG_AUTO,
605 .rx_fn = rx_data_fn,
607 [L1SCHED_SDCCH8_CBCH] = {
608 .name = "SDCCH/8(CBCH)", /* 3GPP TS 05.02, section 3.3.5 */
609 .desc = "Cell Broadcast channel on SDCCH/8",
610 .gsmtap_chan_type = GSMTAP_CHANNEL_CBCH52,
611 .chan_nr = RSL_CHAN_OSMO_CBCH8,
612 .ss_nr = 2,
614 /* Same as for L1SCHED_BCCH (xCCH), but Rx only. See above. */
615 .burst_buf_size = 4 * GSM_NBITS_NB_GMSK_PAYLOAD,
616 .rx_fn = rx_data_fn,