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 l1a_l23_interface_h
25 #define l1a_l23_interface_h
27 #define L1CTL_NEW_CCCH_REQ 1
28 #define L1CTL_NEW_CCCH_RESP 2
29 #define L1CTL_DATA_IND 3
30 #define L1CTL_RACH_REQ 4
31 #define L1CTL_DM_EST_REQ 5
32 #define L1CTL_DATA_REQ 7
34 #define L1CTL_PM_REQ 9 /* power measurement */
37 * NOTE: struct size. We do add manual padding out of the believe
38 * that it will avoid some unaligned access.
45 } __attribute__((packed));
48 * downlink info ... down from the BTS..
50 struct l1ctl_info_dl {
51 /* GSM 08.58 channel number (9.3.1) */
53 /* GSM 08.58 link identifier (9.3.2) */
58 /* the ARFCN and the band. FIXME: what about MAIO? */
61 uint8_t rx_level; /* 0 .. 63 in typical GSM notation (dBm+110) */
62 uint8_t snr; /* Signal/Noise Ration (dB) */
64 } __attribute__((packed));
66 /* new CCCH was found. This is following the header */
67 struct l1ctl_sync_new_ccch_resp {
70 } __attribute__((packed));
72 /* data on the CCCH was found. This is following the header */
73 struct l1ctl_data_ind {
75 } __attribute__((packed));
80 struct l1ctl_info_ul {
81 /* GSM 08.58 channel number (9.3.1) */
83 /* GSM 08.58 link identifier (9.3.2) */
90 } __attribute__((packed));
93 * msg for SYNC_NEW_CCCH_REQ
94 * the l1_info_ul header is in front
96 struct l1ctl_sync_new_ccch_req {
98 } __attribute__((packed));
101 /* the l1_info_ul header is in front */
102 struct l1ctl_rach_req {
105 } __attribute__((packed));
107 struct l1ctl_dm_est_req {
118 uint8_t arfcn_high:2,
125 } __attribute__((packed));
127 struct l1ctl_pm_req {
133 uint16_t band_arfcn_from;
134 uint16_t band_arfcn_to;
137 } __attribute__((packed));