Neels Hofmeyr | 17518fe | 2017-06-20 04:35:06 +0200 | [diff] [blame] | 1 | /*! \file gsm_08_58.h |
| 2 | * GSM Radio Signalling Link messages on the A-bis interface. |
Harald Welte | ec8b450 | 2010-02-20 20:34:29 +0100 | [diff] [blame] | 3 | * 3GPP TS 08.58 version 8.6.0 Release 1999 / ETSI TS 100 596 V8.6.0 */ |
Neels Hofmeyr | 17518fe | 2017-06-20 04:35:06 +0200 | [diff] [blame] | 4 | /* |
| 5 | * (C) 2008 by Harald Welte <laforge@gnumonks.org> |
Harald Welte | ec8b450 | 2010-02-20 20:34:29 +0100 | [diff] [blame] | 6 | * All Rights Reserved |
| 7 | * |
| 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. |
| 12 | * |
| 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. |
| 17 | * |
| 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. |
| 21 | * |
| 22 | */ |
| 23 | |
Neels Hofmeyr | 17518fe | 2017-06-20 04:35:06 +0200 | [diff] [blame] | 24 | #pragma once |
| 25 | |
Harald Welte | ec8b450 | 2010-02-20 20:34:29 +0100 | [diff] [blame] | 26 | #include <stdint.h> |
| 27 | |
Harald Welte | 8f2c7e5 | 2011-08-17 18:52:03 +0200 | [diff] [blame] | 28 | /*! \addtogroup rsl |
| 29 | * @{ |
Neels Hofmeyr | 17518fe | 2017-06-20 04:35:06 +0200 | [diff] [blame] | 30 | * \file gsm_08_58.h */ |
Harald Welte | 8f2c7e5 | 2011-08-17 18:52:03 +0200 | [diff] [blame] | 31 | |
Neels Hofmeyr | 87e4550 | 2017-06-20 00:17:59 +0200 | [diff] [blame] | 32 | /*! RSL common header */ |
Harald Welte | ec8b450 | 2010-02-20 20:34:29 +0100 | [diff] [blame] | 33 | struct abis_rsl_common_hdr { |
Neels Hofmeyr | 87e4550 | 2017-06-20 00:17:59 +0200 | [diff] [blame] | 34 | uint8_t msg_discr; /*!< message discriminator (ABIS_RSL_MDISC_*) */ |
| 35 | uint8_t msg_type; /*!< message type (\ref abis_rsl_msgtype) */ |
| 36 | uint8_t data[0]; /*!< actual payload data */ |
Harald Welte | ec8b450 | 2010-02-20 20:34:29 +0100 | [diff] [blame] | 37 | } __attribute__ ((packed)); |
| 38 | |
Neels Hofmeyr | 87e4550 | 2017-06-20 00:17:59 +0200 | [diff] [blame] | 39 | /* RSL RLL header (Chapter 8.3) */ |
Harald Welte | ec8b450 | 2010-02-20 20:34:29 +0100 | [diff] [blame] | 40 | struct abis_rsl_rll_hdr { |
| 41 | struct abis_rsl_common_hdr c; |
Neels Hofmeyr | 87e4550 | 2017-06-20 00:17:59 +0200 | [diff] [blame] | 42 | uint8_t ie_chan; /*!< \ref RSL_IE_CHAN_NR (tag) */ |
| 43 | uint8_t chan_nr; /*!< RSL channel number (value) */ |
| 44 | uint8_t ie_link_id; /*!< \ref RSL_IE_LINK_IDENT (tag) */ |
| 45 | uint8_t link_id; /*!< RSL link identifier (value) */ |
| 46 | uint8_t data[0]; /*!< message payload data */ |
Harald Welte | ec8b450 | 2010-02-20 20:34:29 +0100 | [diff] [blame] | 47 | } __attribute__ ((packed)); |
| 48 | |
Neels Hofmeyr | 87e4550 | 2017-06-20 00:17:59 +0200 | [diff] [blame] | 49 | /* RSL Dedicated Channel header (Chapter 8.3 and 8.4) */ |
Harald Welte | ec8b450 | 2010-02-20 20:34:29 +0100 | [diff] [blame] | 50 | struct abis_rsl_dchan_hdr { |
| 51 | struct abis_rsl_common_hdr c; |
Neels Hofmeyr | 87e4550 | 2017-06-20 00:17:59 +0200 | [diff] [blame] | 52 | uint8_t ie_chan; /*!< \ref RSL_IE_CHAN_NR (tag) */ |
| 53 | uint8_t chan_nr; /*!< RSL channel number (value) */ |
| 54 | uint8_t data[0]; /*!< message payload data */ |
Harald Welte | ec8b450 | 2010-02-20 20:34:29 +0100 | [diff] [blame] | 55 | } __attribute__ ((packed)); |
| 56 | |
Neels Hofmeyr | 87e4550 | 2017-06-20 00:17:59 +0200 | [diff] [blame] | 57 | /* RSL Common Channel header (Chapter 8.5) */ |
Harald Welte | 6eb7d6c | 2010-07-13 13:48:13 +0200 | [diff] [blame] | 58 | struct abis_rsl_cchan_hdr { |
| 59 | struct abis_rsl_common_hdr c; |
Neels Hofmeyr | 87e4550 | 2017-06-20 00:17:59 +0200 | [diff] [blame] | 60 | uint8_t ie_chan; /*!< \ref RSL_IE_CHAN_NR (tag) */ |
| 61 | uint8_t chan_nr; /*!< RSL channel number (value) */ |
| 62 | uint8_t data[0]; /*!< message payload data */ |
Harald Welte | 6eb7d6c | 2010-07-13 13:48:13 +0200 | [diff] [blame] | 63 | } __attribute__ ((packed)); |
| 64 | |
Harald Welte | ec8b450 | 2010-02-20 20:34:29 +0100 | [diff] [blame] | 65 | |
| 66 | /* Chapter 9.1 */ |
Neels Hofmeyr | 87e4550 | 2017-06-20 00:17:59 +0200 | [diff] [blame] | 67 | /* RSL Message Discriminator: RLL */ |
Harald Welte | ec8b450 | 2010-02-20 20:34:29 +0100 | [diff] [blame] | 68 | #define ABIS_RSL_MDISC_RLL 0x02 |
Neels Hofmeyr | 87e4550 | 2017-06-20 00:17:59 +0200 | [diff] [blame] | 69 | /* RSL Message Discriminator: Dedicated Channel */ |
Harald Welte | ec8b450 | 2010-02-20 20:34:29 +0100 | [diff] [blame] | 70 | #define ABIS_RSL_MDISC_DED_CHAN 0x08 |
Neels Hofmeyr | 87e4550 | 2017-06-20 00:17:59 +0200 | [diff] [blame] | 71 | /* RSL Message Discriminator: Common Channel */ |
Harald Welte | ec8b450 | 2010-02-20 20:34:29 +0100 | [diff] [blame] | 72 | #define ABIS_RSL_MDISC_COM_CHAN 0x0c |
Neels Hofmeyr | 87e4550 | 2017-06-20 00:17:59 +0200 | [diff] [blame] | 73 | /* RSL Message Discriminator: TRX Management */ |
Harald Welte | ec8b450 | 2010-02-20 20:34:29 +0100 | [diff] [blame] | 74 | #define ABIS_RSL_MDISC_TRX 0x10 |
Neels Hofmeyr | 87e4550 | 2017-06-20 00:17:59 +0200 | [diff] [blame] | 75 | /* RSL Message Discriminator: Location Service */ |
Harald Welte | ec8b450 | 2010-02-20 20:34:29 +0100 | [diff] [blame] | 76 | #define ABIS_RSL_MDISC_LOC 0x20 |
Neels Hofmeyr | 87e4550 | 2017-06-20 00:17:59 +0200 | [diff] [blame] | 77 | /* RSL Message Discriminator: ip.access */ |
Harald Welte | ec8b450 | 2010-02-20 20:34:29 +0100 | [diff] [blame] | 78 | #define ABIS_RSL_MDISC_IPACCESS 0x7e |
| 79 | #define ABIS_RSL_MDISC_TRANSP 0x01 |
| 80 | |
Neels Hofmeyr | 87e4550 | 2017-06-20 00:17:59 +0200 | [diff] [blame] | 81 | /* Check if given RSL message discriminator is transparent */ |
Harald Welte | ec8b450 | 2010-02-20 20:34:29 +0100 | [diff] [blame] | 82 | #define ABIS_RSL_MDISC_IS_TRANSP(x) (x & 0x01) |
| 83 | |
Neels Hofmeyr | 87e4550 | 2017-06-20 00:17:59 +0200 | [diff] [blame] | 84 | /* RSL Message Type (Chapter 9.1) */ |
Harald Welte | ec8b450 | 2010-02-20 20:34:29 +0100 | [diff] [blame] | 85 | enum abis_rsl_msgtype { |
| 86 | /* Radio Link Layer Management */ |
| 87 | RSL_MT_DATA_REQ = 0x01, |
| 88 | RSL_MT_DATA_IND, |
| 89 | RSL_MT_ERROR_IND, |
| 90 | RSL_MT_EST_REQ, |
| 91 | RSL_MT_EST_CONF, |
| 92 | RSL_MT_EST_IND, |
| 93 | RSL_MT_REL_REQ, |
| 94 | RSL_MT_REL_CONF, |
| 95 | RSL_MT_REL_IND, |
| 96 | RSL_MT_UNIT_DATA_REQ, |
| 97 | RSL_MT_UNIT_DATA_IND, /* 0x0b */ |
Andreas Eversberg | 816e24c | 2010-06-25 02:50:56 +0200 | [diff] [blame] | 98 | RSL_MT_SUSP_REQ, /* non-standard elements */ |
| 99 | RSL_MT_SUSP_CONF, |
| 100 | RSL_MT_RES_REQ, |
| 101 | RSL_MT_RECON_REQ, /* 0x0f */ |
Harald Welte | ec8b450 | 2010-02-20 20:34:29 +0100 | [diff] [blame] | 102 | |
| 103 | /* Common Channel Management / TRX Management */ |
| 104 | RSL_MT_BCCH_INFO = 0x11, |
| 105 | RSL_MT_CCCH_LOAD_IND, |
| 106 | RSL_MT_CHAN_RQD, |
| 107 | RSL_MT_DELETE_IND, |
| 108 | RSL_MT_PAGING_CMD, |
| 109 | RSL_MT_IMMEDIATE_ASSIGN_CMD, |
| 110 | RSL_MT_SMS_BC_REQ, |
Harald Welte | 6eb7d6c | 2010-07-13 13:48:13 +0200 | [diff] [blame] | 111 | RSL_MT_CHAN_CONF, /* non-standard element */ |
Harald Welte | ec8b450 | 2010-02-20 20:34:29 +0100 | [diff] [blame] | 112 | /* empty */ |
| 113 | RSL_MT_RF_RES_IND = 0x19, |
| 114 | RSL_MT_SACCH_FILL, |
| 115 | RSL_MT_OVERLOAD, |
| 116 | RSL_MT_ERROR_REPORT, |
| 117 | RSL_MT_SMS_BC_CMD, |
| 118 | RSL_MT_CBCH_LOAD_IND, |
| 119 | RSL_MT_NOT_CMD, /* 0x1f */ |
| 120 | |
| 121 | /* Dedicate Channel Management */ |
| 122 | RSL_MT_CHAN_ACTIV = 0x21, |
| 123 | RSL_MT_CHAN_ACTIV_ACK, |
| 124 | RSL_MT_CHAN_ACTIV_NACK, |
| 125 | RSL_MT_CONN_FAIL, |
| 126 | RSL_MT_DEACTIVATE_SACCH, |
| 127 | RSL_MT_ENCR_CMD, |
| 128 | RSL_MT_HANDO_DET, |
| 129 | RSL_MT_MEAS_RES, |
| 130 | RSL_MT_MODE_MODIFY_REQ, |
| 131 | RSL_MT_MODE_MODIFY_ACK, |
| 132 | RSL_MT_MODE_MODIFY_NACK, |
| 133 | RSL_MT_PHY_CONTEXT_REQ, |
| 134 | RSL_MT_PHY_CONTEXT_CONF, |
| 135 | RSL_MT_RF_CHAN_REL, |
| 136 | RSL_MT_MS_POWER_CONTROL, |
| 137 | RSL_MT_BS_POWER_CONTROL, /* 0x30 */ |
| 138 | RSL_MT_PREPROC_CONFIG, |
| 139 | RSL_MT_PREPROC_MEAS_RES, |
| 140 | RSL_MT_RF_CHAN_REL_ACK, |
| 141 | RSL_MT_SACCH_INFO_MODIFY, |
| 142 | RSL_MT_TALKER_DET, |
| 143 | RSL_MT_LISTENER_DET, |
| 144 | RSL_MT_REMOTE_CODEC_CONF_REP, |
| 145 | RSL_MT_RTD_REP, |
| 146 | RSL_MT_PRE_HANDO_NOTIF, |
| 147 | RSL_MT_MR_CODEC_MOD_REQ, |
| 148 | RSL_MT_MR_CODEC_MOD_ACK, |
| 149 | RSL_MT_MR_CODEC_MOD_NACK, |
| 150 | RSL_MT_MR_CODEC_MOD_PER, |
| 151 | RSL_MT_TFO_REP, |
| 152 | RSL_MT_TFO_MOD_REQ, /* 0x3f */ |
| 153 | RSL_MT_LOCATION_INFO = 0x41, |
| 154 | |
| 155 | /* ip.access specific RSL message types */ |
| 156 | RSL_MT_IPAC_DIR_RETR_ENQ = 0x40, |
| 157 | RSL_MT_IPAC_PDCH_ACT = 0x48, |
| 158 | RSL_MT_IPAC_PDCH_ACT_ACK, |
| 159 | RSL_MT_IPAC_PDCH_ACT_NACK, |
| 160 | RSL_MT_IPAC_PDCH_DEACT = 0x4b, |
| 161 | RSL_MT_IPAC_PDCH_DEACT_ACK, |
| 162 | RSL_MT_IPAC_PDCH_DEACT_NACK, |
| 163 | RSL_MT_IPAC_CONNECT_MUX = 0x50, |
| 164 | RSL_MT_IPAC_CONNECT_MUX_ACK, |
| 165 | RSL_MT_IPAC_CONNECT_MUX_NACK, |
| 166 | RSL_MT_IPAC_BIND_MUX = 0x53, |
| 167 | RSL_MT_IPAC_BIND_MUX_ACK, |
| 168 | RSL_MT_IPAC_BIND_MUX_NACK, |
| 169 | RSL_MT_IPAC_DISC_MUX = 0x56, |
| 170 | RSL_MT_IPAC_DISC_MUX_ACK, |
| 171 | RSL_MT_IPAC_DISC_MUX_NACK, |
Minh-Quang Nguyen | 17a8748 | 2016-09-02 11:28:31 -0400 | [diff] [blame] | 172 | RSL_MT_IPAC_MEAS_PREPROC_DFT = 0x60, /*Extented Common Channel Management */ |
| 173 | RSL_MT_IPAC_HO_CAN_ENQ = 0x61, |
| 174 | RSL_MT_IPAC_HO_CAN_RES = 0x62, |
Harald Welte | ec8b450 | 2010-02-20 20:34:29 +0100 | [diff] [blame] | 175 | RSL_MT_IPAC_CRCX = 0x70, /* Bind to local BTS RTP port */ |
| 176 | RSL_MT_IPAC_CRCX_ACK, |
| 177 | RSL_MT_IPAC_CRCX_NACK, |
| 178 | RSL_MT_IPAC_MDCX = 0x73, |
| 179 | RSL_MT_IPAC_MDCX_ACK, |
| 180 | RSL_MT_IPAC_MDCX_NACK, |
| 181 | RSL_MT_IPAC_DLCX_IND = 0x76, |
| 182 | RSL_MT_IPAC_DLCX = 0x77, |
| 183 | RSL_MT_IPAC_DLCX_ACK, |
| 184 | RSL_MT_IPAC_DLCX_NACK, |
| 185 | }; |
| 186 | |
Neels Hofmeyr | 87e4550 | 2017-06-20 00:17:59 +0200 | [diff] [blame] | 187 | /*! Siemens vendor-specific RSL message types */ |
Harald Welte | ec8b450 | 2010-02-20 20:34:29 +0100 | [diff] [blame] | 188 | enum abis_rsl_msgtype_siemens { |
| 189 | RSL_MT_SIEMENS_MRPCI = 0x41, |
| 190 | RSL_MT_SIEMENS_INTRAC_HO_COND_IND = 0x42, |
| 191 | RSL_MT_SIEMENS_INTERC_HO_COND_IND = 0x43, |
| 192 | RSL_MT_SIEMENS_FORCED_HO_REQ = 0x44, |
| 193 | RSL_MT_SIEMENS_PREF_AREA_REQ = 0x45, |
| 194 | RSL_MT_SIEMENS_PREF_AREA = 0x46, |
| 195 | RSL_MT_SIEMENS_START_TRACE = 0x47, |
| 196 | RSL_MT_SIEMENS_START_TRACE_ACK = 0x48, |
| 197 | RSL_MT_SIEMENS_STOP_TRACE = 0x49, |
| 198 | RSL_MT_SIEMENS_TRMR = 0x4a, |
| 199 | RSL_MT_SIEMENS_HO_FAIL_IND = 0x4b, |
| 200 | RSL_MT_SIEMENS_STOP_TRACE_ACK = 0x4c, |
| 201 | RSL_MT_SIEMENS_UPLF = 0x4d, |
| 202 | RSL_MT_SIEMENS_UPLB = 0x4e, |
| 203 | RSL_MT_SIEMENS_SET_SYS_INFO_10 = 0x4f, |
| 204 | RSL_MT_SIEMENS_MODIF_COND_IND = 0x50, |
| 205 | }; |
| 206 | |
Neels Hofmeyr | 87e4550 | 2017-06-20 00:17:59 +0200 | [diff] [blame] | 207 | /*! RSL Information Element Identifiers (Chapter 9.3) */ |
Harald Welte | ec8b450 | 2010-02-20 20:34:29 +0100 | [diff] [blame] | 208 | enum abis_rsl_ie { |
| 209 | RSL_IE_CHAN_NR = 0x01, |
| 210 | RSL_IE_LINK_IDENT, |
| 211 | RSL_IE_ACT_TYPE, |
| 212 | RSL_IE_BS_POWER, |
| 213 | RSL_IE_CHAN_IDENT, |
| 214 | RSL_IE_CHAN_MODE, |
| 215 | RSL_IE_ENCR_INFO, |
| 216 | RSL_IE_FRAME_NUMBER, |
| 217 | RSL_IE_HANDO_REF, |
| 218 | RSL_IE_L1_INFO, |
| 219 | RSL_IE_L3_INFO, |
| 220 | RSL_IE_MS_IDENTITY, |
| 221 | RSL_IE_MS_POWER, |
| 222 | RSL_IE_PAGING_GROUP, |
| 223 | RSL_IE_PAGING_LOAD, |
| 224 | RSL_IE_PYHS_CONTEXT = 0x10, |
| 225 | RSL_IE_ACCESS_DELAY, |
| 226 | RSL_IE_RACH_LOAD, |
| 227 | RSL_IE_REQ_REFERENCE, |
| 228 | RSL_IE_RELEASE_MODE, |
| 229 | RSL_IE_RESOURCE_INFO, |
| 230 | RSL_IE_RLM_CAUSE, |
| 231 | RSL_IE_STARTNG_TIME, |
| 232 | RSL_IE_TIMING_ADVANCE, |
| 233 | RSL_IE_UPLINK_MEAS, |
| 234 | RSL_IE_CAUSE, |
| 235 | RSL_IE_MEAS_RES_NR, |
| 236 | RSL_IE_MSG_ID, |
| 237 | /* reserved */ |
| 238 | RSL_IE_SYSINFO_TYPE = 0x1e, |
| 239 | RSL_IE_MS_POWER_PARAM, |
| 240 | RSL_IE_BS_POWER_PARAM, |
| 241 | RSL_IE_PREPROC_PARAM, |
| 242 | RSL_IE_PREPROC_MEAS, |
| 243 | RSL_IE_IMM_ASS_INFO, /* Phase 1 (3.6.0), later Full below */ |
| 244 | RSL_IE_SMSCB_INFO = 0x24, |
| 245 | RSL_IE_MS_TIMING_OFFSET, |
| 246 | RSL_IE_ERR_MSG, |
| 247 | RSL_IE_FULL_BCCH_INFO, |
| 248 | RSL_IE_CHAN_NEEDED, |
| 249 | RSL_IE_CB_CMD_TYPE, |
| 250 | RSL_IE_SMSCB_MSG, |
| 251 | RSL_IE_FULL_IMM_ASS_INFO, |
| 252 | RSL_IE_SACCH_INFO, |
| 253 | RSL_IE_CBCH_LOAD_INFO, |
| 254 | RSL_IE_SMSCB_CHAN_INDICATOR, |
| 255 | RSL_IE_GROUP_CALL_REF, |
| 256 | RSL_IE_CHAN_DESC = 0x30, |
| 257 | RSL_IE_NCH_DRX_INFO, |
| 258 | RSL_IE_CMD_INDICATOR, |
| 259 | RSL_IE_EMLPP_PRIO, |
| 260 | RSL_IE_UIC, |
| 261 | RSL_IE_MAIN_CHAN_REF, |
| 262 | RSL_IE_MR_CONFIG, |
| 263 | RSL_IE_MR_CONTROL, |
| 264 | RSL_IE_SUP_CODEC_TYPES, |
| 265 | RSL_IE_CODEC_CONFIG, |
| 266 | RSL_IE_RTD, |
| 267 | RSL_IE_TFO_STATUS, |
| 268 | RSL_IE_LLP_APDU, |
| 269 | /* Siemens vendor-specific */ |
| 270 | RSL_IE_SIEMENS_MRPCI = 0x40, |
| 271 | RSL_IE_SIEMENS_PREF_AREA_TYPE = 0x43, |
| 272 | RSL_IE_SIEMENS_ININ_CELL_HO_PAR = 0x45, |
| 273 | RSL_IE_SIEMENS_TRACE_REF_NR = 0x46, |
| 274 | RSL_IE_SIEMENS_INT_TRACE_IDX = 0x47, |
| 275 | RSL_IE_SIEMENS_L2_HDR_INFO = 0x48, |
| 276 | RSL_IE_SIEMENS_HIGHEST_RATE = 0x4e, |
| 277 | RSL_IE_SIEMENS_SUGGESTED_RATE = 0x4f, |
| 278 | |
| 279 | /* ip.access */ |
| 280 | RSL_IE_IPAC_SRTP_CONFIG = 0xe0, |
| 281 | RSL_IE_IPAC_PROXY_UDP = 0xe1, |
| 282 | RSL_IE_IPAC_BSCMPL_TOUT = 0xe2, |
| 283 | RSL_IE_IPAC_REMOTE_IP = 0xf0, |
| 284 | RSL_IE_IPAC_REMOTE_PORT = 0xf1, |
| 285 | RSL_IE_IPAC_RTP_PAYLOAD = 0xf2, |
| 286 | RSL_IE_IPAC_LOCAL_PORT = 0xf3, |
| 287 | RSL_IE_IPAC_SPEECH_MODE = 0xf4, |
| 288 | RSL_IE_IPAC_LOCAL_IP = 0xf5, |
| 289 | RSL_IE_IPAC_CONN_STAT = 0xf6, |
| 290 | RSL_IE_IPAC_HO_C_PARMS = 0xf7, |
| 291 | RSL_IE_IPAC_CONN_ID = 0xf8, |
| 292 | RSL_IE_IPAC_RTP_CSD_FMT = 0xf9, |
| 293 | RSL_IE_IPAC_RTP_JIT_BUF = 0xfa, |
| 294 | RSL_IE_IPAC_RTP_COMPR = 0xfb, |
| 295 | RSL_IE_IPAC_RTP_PAYLOAD2= 0xfc, |
| 296 | RSL_IE_IPAC_RTP_MPLEX = 0xfd, |
| 297 | RSL_IE_IPAC_RTP_MPLEX_ID= 0xfe, |
| 298 | }; |
| 299 | |
Harald Welte | 6e363e7 | 2016-11-16 16:58:52 +0100 | [diff] [blame] | 300 | /* Ericsson specific IEs, clash with above partially, so they're not |
| 301 | * part of the enum */ |
| 302 | #define RSL_IE_ERIC_INST_NR 0x48 |
| 303 | #define RSL_IE_ERIC_PGSL_TIMERS 0x49 |
| 304 | #define RSL_IE_ERIC_REPEAT_DL_FACCH 0x4a |
| 305 | #define RSL_IE_ERIC_POWER_INFO 0xf0 |
| 306 | #define RSL_IE_ERIC_MOBILE_ID 0xf1 |
| 307 | #define RSL_IE_ERIC_BCCH_MAPPING 0xf2 |
| 308 | #define RSL_IE_ERIC_PACKET_PAG_IND 0xf3 |
| 309 | #define RSL_IE_ERIC_CNTR_CTRL 0xf4 |
| 310 | #define RSL_IE_ERIC_CNTR_CTRL_ACK 0xf5 |
| 311 | #define RSL_IE_ERIC_CNTR_REPORT 0xf6 |
| 312 | #define RSL_IE_ERIC_ICP_CONN 0xf7 |
| 313 | #define RSL_IE_ERIC_EMR_SUPPORT 0xf8 |
| 314 | #define RSL_IE_ERIC_EGPRS_REQ_REF 0xf9 |
| 315 | #define RSL_IE_ERIC_VGCS_REL 0xfa |
| 316 | #define RSL_IE_ERIC_REP_PER_NCH 0xfb |
| 317 | #define RSL_IE_ERIC_NY2 0xfc |
| 318 | #define RSL_IE_ERIC_T3115 0xfd |
| 319 | #define RSL_IE_ERIC_ACTIVATE_FLAG 0xfe |
| 320 | #define RSL_IE_ERIC_FULL_NCH_INFO 0xff |
| 321 | |
Minh-Quang Nguyen | 17a8748 | 2016-09-02 11:28:31 -0400 | [diff] [blame] | 322 | /* IPAC MEAS_PREPROC AVERAGING METHOD */ |
| 323 | enum { |
| 324 | IPAC_UNWEIGHTED_AVE = 0, |
| 325 | IPAC_WEIGHTED_AVE, |
| 326 | IPAC_MEDIAN_AVE |
| 327 | }; |
| 328 | |
| 329 | /* IPAC MEAS_PREPROC AVERAGING PARAMID */ |
| 330 | enum { |
| 331 | IPAC_RXLEV_AVE = 0, |
| 332 | IPAC_RXQUAL_AVE, |
| 333 | IPAC_MS_BTS_DIS_AVE |
| 334 | }; |
| 335 | |
| 336 | /* IPAC MEAS_PREPROC HO CAUSES */ |
| 337 | enum { |
| 338 | IPAC_HO_RQD_CAUSE_L_RXLEV_UL_H = 0x01, |
| 339 | IPAC_HO_RQD_CAUSE_L_RXLEV_DL_H, |
| 340 | IPAC_HO_RQD_CAUSE_L_RXQUAL_UL_H, |
| 341 | IPAC_HO_RQD_CAUSE_L_RXQUAL_DL_H, |
| 342 | IPAC_HO_RQD_CAUSE_RXLEV_UL_IH, |
| 343 | IPAC_HO_RQD_CAUSE_RXLEV_DL_IH, |
| 344 | IPAC_HO_RQD_CAUSE_MAX_MS_RANGE, |
| 345 | IPAC_HO_RQD_CAUSE_POWER_BUDGET, |
| 346 | IPAC_HO_RQD_CAUSE_ENQUIRY, |
| 347 | IPAC_HO_RQD_CAUSE_ENQUIRY_FAILED, |
| 348 | IPAC_HO_RQD_CAUSE_NORMAL3G, |
| 349 | IPAC_HO_RQD_CAUSE_EMERGENCY3G, |
| 350 | IPAC_HO_RQD_CAUSE_SERVICE_PREFERRED3G, |
| 351 | IPAC_HO_RQD_CAUSE_O_M_SHUTDOWN, |
| 352 | IPAC_HO_RQD_CAUSE_QUALITY_PROMOTION, |
| 353 | IPAC_HO_RQD_CAUSE_LOAD_PROMOTION, |
| 354 | IPAC_HO_RQD_CAUSE_LOAD_DEMOTION, |
| 355 | IPAC_HO_RQD_CAUSE_MAX, |
| 356 | }; |
| 357 | |
Harald Welte | ec8b450 | 2010-02-20 20:34:29 +0100 | [diff] [blame] | 358 | /* Chapter 9.3.1 */ |
| 359 | #define RSL_CHAN_NR_MASK 0xf8 |
Neels Hofmeyr | 15b96ff | 2016-07-18 23:33:48 +0200 | [diff] [blame] | 360 | #define RSL_CHAN_NR_1 0x08 /*< bit to add for 2nd,... lchan */ |
Harald Welte | ec8b450 | 2010-02-20 20:34:29 +0100 | [diff] [blame] | 361 | #define RSL_CHAN_Bm_ACCHs 0x08 |
| 362 | #define RSL_CHAN_Lm_ACCHs 0x10 /* .. 0x18 */ |
| 363 | #define RSL_CHAN_SDCCH4_ACCH 0x20 /* .. 0x38 */ |
| 364 | #define RSL_CHAN_SDCCH8_ACCH 0x40 /* ...0x78 */ |
| 365 | #define RSL_CHAN_BCCH 0x80 |
| 366 | #define RSL_CHAN_RACH 0x88 |
| 367 | #define RSL_CHAN_PCH_AGCH 0x90 |
Neels Hofmeyr | fd80f5a | 2016-07-14 03:21:05 +0200 | [diff] [blame] | 368 | #define RSL_CHAN_OSMO_PDCH 0xc0 /*< non-standard, for dyn TS */ |
Harald Welte | ec8b450 | 2010-02-20 20:34:29 +0100 | [diff] [blame] | 369 | |
| 370 | /* Chapter 9.3.3 */ |
| 371 | #define RSL_ACT_TYPE_INITIAL 0x00 |
| 372 | #define RSL_ACT_TYPE_REACT 0x80 |
| 373 | #define RSL_ACT_INTRA_IMM_ASS 0x00 |
| 374 | #define RSL_ACT_INTRA_NORM_ASS 0x01 |
| 375 | #define RSL_ACT_INTER_ASYNC 0x02 |
| 376 | #define RSL_ACT_INTER_SYNC 0x03 |
| 377 | #define RSL_ACT_SECOND_ADD 0x04 |
| 378 | #define RSL_ACT_SECOND_MULTI 0x05 |
Neels Hofmeyr | fd80f5a | 2016-07-14 03:21:05 +0200 | [diff] [blame] | 379 | #define RSL_ACT_OSMO_PDCH 0x0f /*< non-standard, for dyn TS */ |
Harald Welte | ec8b450 | 2010-02-20 20:34:29 +0100 | [diff] [blame] | 380 | |
Neels Hofmeyr | 87e4550 | 2017-06-20 00:17:59 +0200 | [diff] [blame] | 381 | /*! RSL Channel Mode IF (Chapter 9.3.6) */ |
Harald Welte | ec8b450 | 2010-02-20 20:34:29 +0100 | [diff] [blame] | 382 | struct rsl_ie_chan_mode { |
| 383 | uint8_t dtx_dtu; |
| 384 | uint8_t spd_ind; |
| 385 | uint8_t chan_rt; |
| 386 | uint8_t chan_rate; |
| 387 | } __attribute__ ((packed)); |
| 388 | #define RSL_CMOD_DTXu 0x01 /* uplink */ |
| 389 | #define RSL_CMOD_DTXd 0x02 /* downlink */ |
| 390 | enum rsl_cmod_spd { |
| 391 | RSL_CMOD_SPD_SPEECH = 0x01, |
| 392 | RSL_CMOD_SPD_DATA = 0x02, |
| 393 | RSL_CMOD_SPD_SIGN = 0x03, |
| 394 | }; |
| 395 | #define RSL_CMOD_CRT_SDCCH 0x01 |
| 396 | #define RSL_CMOD_CRT_TCH_Bm 0x08 /* full-rate */ |
| 397 | #define RSL_CMOD_CRT_TCH_Lm 0x09 /* half-rate */ |
| 398 | /* FIXME: More CRT types */ |
| 399 | /* Speech */ |
| 400 | #define RSL_CMOD_SP_GSM1 0x01 |
| 401 | #define RSL_CMOD_SP_GSM2 0x11 |
| 402 | #define RSL_CMOD_SP_GSM3 0x21 |
Harald Welte | eed2611 | 2012-08-24 15:35:34 +0200 | [diff] [blame] | 403 | /* non-transparent data */ |
| 404 | #define RSL_CMOD_CSD_NT_43k5 0x74 |
| 405 | #define RSL_CMOD_CSD_NT_28k8 0x71 |
| 406 | #define RSL_CMOD_CSD_NT_14k5 0x58 |
| 407 | #define RSL_CMOD_CSD_NT_12k0 0x50 |
| 408 | #define RSL_CMOD_CSD_NT_6k0 0x51 |
| 409 | /* legacy #defines with wrong name */ |
| 410 | #define RSL_CMOD_SP_NT_14k5 RSL_CMOD_CSD_NT_14k5 |
| 411 | #define RSL_CMOD_SP_NT_12k0 RSL_CMOD_CSD_NT_12k0 |
| 412 | #define RSL_CMOD_SP_NT_6k0 RSL_CMOD_CSD_NT_6k0 |
| 413 | /* transparent data */ |
| 414 | #define RSL_CMOD_CSD_T_32000 0x38 |
| 415 | #define RSL_CMOD_CSD_T_29000 0x39 |
| 416 | #define RSL_CMOD_CSD_T_14400 0x18 |
| 417 | #define RSL_CMOD_CSD_T_9600 0x10 |
| 418 | #define RSL_CMOD_CSD_T_4800 0x11 |
| 419 | #define RSL_CMOD_CSD_T_2400 0x12 |
| 420 | #define RSL_CMOD_CSD_T_1200 0x13 |
| 421 | #define RSL_CMOD_CSD_T_600 0x14 |
| 422 | #define RSL_CMOD_CSD_T_1200_75 0x15 |
Harald Welte | ec8b450 | 2010-02-20 20:34:29 +0100 | [diff] [blame] | 423 | |
Neels Hofmeyr | 87e4550 | 2017-06-20 00:17:59 +0200 | [diff] [blame] | 424 | /*! RSL Channel Identification IE (Chapter 9.3.5) */ |
Harald Welte | ec8b450 | 2010-02-20 20:34:29 +0100 | [diff] [blame] | 425 | struct rsl_ie_chan_ident { |
| 426 | /* GSM 04.08 10.5.2.5 */ |
| 427 | struct { |
| 428 | uint8_t iei; |
| 429 | uint8_t chan_nr; /* enc_chan_nr */ |
| 430 | uint8_t oct3; |
| 431 | uint8_t oct4; |
| 432 | } chan_desc; |
| 433 | #if 0 /* spec says we need this but Abissim doesn't use it */ |
| 434 | struct { |
| 435 | uint8_t tag; |
| 436 | uint8_t len; |
| 437 | } mobile_alloc; |
| 438 | #endif |
| 439 | } __attribute__ ((packed)); |
| 440 | |
| 441 | /* Chapter 9.3.22 */ |
| 442 | #define RLL_CAUSE_T200_EXPIRED 0x01 |
| 443 | #define RLL_CAUSE_REEST_REQ 0x02 |
| 444 | #define RLL_CAUSE_UNSOL_UA_RESP 0x03 |
| 445 | #define RLL_CAUSE_UNSOL_DM_RESP 0x04 |
| 446 | #define RLL_CAUSE_UNSOL_DM_RESP_MF 0x05 |
| 447 | #define RLL_CAUSE_UNSOL_SPRV_RESP 0x06 |
| 448 | #define RLL_CAUSE_SEQ_ERR 0x07 |
| 449 | #define RLL_CAUSE_UFRM_INC_PARAM 0x08 |
| 450 | #define RLL_CAUSE_SFRM_INC_PARAM 0x09 |
| 451 | #define RLL_CAUSE_IFRM_INC_MBITS 0x0a |
| 452 | #define RLL_CAUSE_IFRM_INC_LEN 0x0b |
| 453 | #define RLL_CAUSE_FRM_UNIMPL 0x0c |
| 454 | #define RLL_CAUSE_SABM_MF 0x0d |
| 455 | #define RLL_CAUSE_SABM_INFO_NOTALL 0x0e |
| 456 | |
| 457 | /* Chapter 9.3.26 */ |
| 458 | #define RSL_ERRCLS_NORMAL 0x00 |
| 459 | #define RSL_ERRCLS_RESOURCE_UNAVAIL 0x20 |
| 460 | #define RSL_ERRCLS_SERVICE_UNAVAIL 0x30 |
| 461 | #define RSL_ERRCLS_SERVICE_UNIMPL 0x40 |
| 462 | #define RSL_ERRCLS_INVAL_MSG 0x50 |
| 463 | #define RSL_ERRCLS_PROTO_ERROR 0x60 |
| 464 | #define RSL_ERRCLS_INTERWORKING 0x70 |
| 465 | |
| 466 | /* normal event */ |
| 467 | #define RSL_ERR_RADIO_IF_FAIL 0x00 |
| 468 | #define RSL_ERR_RADIO_LINK_FAIL 0x01 |
| 469 | #define RSL_ERR_HANDOVER_ACC_FAIL 0x02 |
| 470 | #define RSL_ERR_TALKER_ACC_FAIL 0x03 |
| 471 | #define RSL_ERR_OM_INTERVENTION 0x07 |
| 472 | #define RSL_ERR_NORMAL_UNSPEC 0x0f |
| 473 | #define RSL_ERR_T_MSRFPCI_EXP 0x18 |
| 474 | /* resource unavailable */ |
| 475 | #define RSL_ERR_EQUIPMENT_FAIL 0x20 |
| 476 | #define RSL_ERR_RR_UNAVAIL 0x21 |
| 477 | #define RSL_ERR_TERR_CH_FAIL 0x22 |
| 478 | #define RSL_ERR_CCCH_OVERLOAD 0x23 |
| 479 | #define RSL_ERR_ACCH_OVERLOAD 0x24 |
| 480 | #define RSL_ERR_PROCESSOR_OVERLOAD 0x25 |
| 481 | #define RSL_ERR_RES_UNAVAIL 0x2f |
| 482 | /* service or option not available */ |
| 483 | #define RSL_ERR_TRANSC_UNAVAIL 0x30 |
| 484 | #define RSL_ERR_SERV_OPT_UNAVAIL 0x3f |
| 485 | /* service or option not implemented */ |
| 486 | #define RSL_ERR_ENCR_UNIMPL 0x40 |
| 487 | #define RSL_ERR_SERV_OPT_UNIMPL 0x4f |
| 488 | /* invalid message */ |
| 489 | #define RSL_ERR_RCH_ALR_ACTV_ALLOC 0x50 |
| 490 | #define RSL_ERR_INVALID_MESSAGE 0x5f |
| 491 | /* protocol error */ |
| 492 | #define RSL_ERR_MSG_DISCR 0x60 |
| 493 | #define RSL_ERR_MSG_TYPE 0x61 |
| 494 | #define RSL_ERR_MSG_SEQ 0x62 |
| 495 | #define RSL_ERR_IE_ERROR 0x63 |
| 496 | #define RSL_ERR_MAND_IE_ERROR 0x64 |
| 497 | #define RSL_ERR_OPT_IE_ERROR 0x65 |
| 498 | #define RSL_ERR_IE_NONEXIST 0x66 |
| 499 | #define RSL_ERR_IE_LENGTH 0x67 |
| 500 | #define RSL_ERR_IE_CONTENT 0x68 |
| 501 | #define RSL_ERR_PROTO 0x6f |
| 502 | /* interworking */ |
| 503 | #define RSL_ERR_INTERWORKING 0x7f |
| 504 | |
| 505 | /* Chapter 9.3.30 */ |
| 506 | #define RSL_SYSTEM_INFO_8 0x00 |
| 507 | #define RSL_SYSTEM_INFO_1 0x01 |
| 508 | #define RSL_SYSTEM_INFO_2 0x02 |
| 509 | #define RSL_SYSTEM_INFO_3 0x03 |
| 510 | #define RSL_SYSTEM_INFO_4 0x04 |
| 511 | #define RSL_SYSTEM_INFO_5 0x05 |
| 512 | #define RSL_SYSTEM_INFO_6 0x06 |
| 513 | #define RSL_SYSTEM_INFO_7 0x07 |
| 514 | #define RSL_SYSTEM_INFO_16 0x08 |
| 515 | #define RSL_SYSTEM_INFO_17 0x09 |
| 516 | #define RSL_SYSTEM_INFO_2bis 0x0a |
| 517 | #define RSL_SYSTEM_INFO_2ter 0x0b |
| 518 | #define RSL_SYSTEM_INFO_5bis 0x0d |
| 519 | #define RSL_SYSTEM_INFO_5ter 0x0e |
| 520 | #define RSL_SYSTEM_INFO_10 0x0f |
Harald Welte | 3d73227 | 2011-06-25 21:39:01 +0200 | [diff] [blame] | 521 | #define RSL_EXT_MEAS_ORDER 0x47 |
Harald Welte | ec8b450 | 2010-02-20 20:34:29 +0100 | [diff] [blame] | 522 | #define RSL_MEAS_INFO 0x48 |
| 523 | #define RSL_SYSTEM_INFO_13 0x28 |
Philipp | 00b1539 | 2016-11-14 12:34:15 +0100 | [diff] [blame] | 524 | #define RSL_ERIC_SYSTEM_INFO_13 0x0C |
Harald Welte | ec8b450 | 2010-02-20 20:34:29 +0100 | [diff] [blame] | 525 | #define RSL_SYSTEM_INFO_2quater 0x29 |
| 526 | #define RSL_SYSTEM_INFO_9 0x2a |
| 527 | #define RSL_SYSTEM_INFO_18 0x2b |
| 528 | #define RSL_SYSTEM_INFO_19 0x2c |
| 529 | #define RSL_SYSTEM_INFO_20 0x2d |
| 530 | |
| 531 | /* Chapter 9.3.40 */ |
| 532 | #define RSL_CHANNEED_ANY 0x00 |
| 533 | #define RSL_CHANNEED_SDCCH 0x01 |
| 534 | #define RSL_CHANNEED_TCH_F 0x02 |
| 535 | #define RSL_CHANNEED_TCH_ForH 0x03 |
| 536 | |
Neels Hofmeyr | 87e4550 | 2017-06-20 00:17:59 +0200 | [diff] [blame] | 537 | /*! RSL Cell Broadcast Command (Chapter 9.3.45) */ |
Alex Badea | 8493018 | 2010-11-27 23:34:46 +0200 | [diff] [blame] | 538 | struct rsl_ie_cb_cmd_type { |
| 539 | uint8_t last_block:2; |
| 540 | uint8_t spare:1; |
| 541 | uint8_t def_bcast:1; |
| 542 | uint8_t command:4; |
| 543 | } __attribute__ ((packed)); |
| 544 | /* ->command */ |
| 545 | #define RSL_CB_CMD_TYPE_NORMAL 0x00 |
| 546 | #define RSL_CB_CMD_TYPE_SCHEDULE 0x08 |
| 547 | #define RSL_CB_CMD_TYPE_DEFAULT 0x0e |
| 548 | #define RSL_CB_CMD_TYPE_NULL 0x0f |
| 549 | /* ->def_bcast */ |
| 550 | #define RSL_CB_CMD_DEFBCAST_NORMAL 0 |
| 551 | #define RSL_CB_CMD_DEFBCAST_NULL 1 |
| 552 | /* ->last_block */ |
| 553 | #define RSL_CB_CMD_LASTBLOCK_4 0 |
| 554 | #define RSL_CB_CMD_LASTBLOCK_1 1 |
| 555 | #define RSL_CB_CMD_LASTBLOCK_2 2 |
| 556 | #define RSL_CB_CMD_LASTBLOCK_3 3 |
| 557 | |
Harald Welte | ec8b450 | 2010-02-20 20:34:29 +0100 | [diff] [blame] | 558 | /* Chapter 3.3.2.3 Brocast control channel */ |
| 559 | /* CCCH-CONF, NC is not combined */ |
| 560 | #define RSL_BCCH_CCCH_CONF_1_NC 0x00 |
| 561 | #define RSL_BCCH_CCCH_CONF_1_C 0x01 |
| 562 | #define RSL_BCCH_CCCH_CONF_2_NC 0x02 |
| 563 | #define RSL_BCCH_CCCH_CONF_3_NC 0x04 |
| 564 | #define RSL_BCCH_CCCH_CONF_4_NC 0x06 |
| 565 | |
| 566 | /* BS-PA-MFRMS */ |
| 567 | #define RSL_BS_PA_MFRMS_2 0x00 |
| 568 | #define RSL_BS_PA_MFRMS_3 0x01 |
| 569 | #define RSL_BS_PA_MFRMS_4 0x02 |
| 570 | #define RSL_BS_PA_MFRMS_5 0x03 |
| 571 | #define RSL_BS_PA_MFRMS_6 0x04 |
| 572 | #define RSL_BS_PA_MFRMS_7 0x05 |
| 573 | #define RSL_BS_PA_MFRMS_8 0x06 |
| 574 | #define RSL_BS_PA_MFRMS_9 0x07 |
| 575 | |
| 576 | /* RSL_IE_IPAC_RTP_PAYLOAD[2] */ |
| 577 | enum rsl_ipac_rtp_payload { |
| 578 | RSL_IPAC_RTP_GSM = 1, |
| 579 | RSL_IPAC_RTP_EFR, |
| 580 | RSL_IPAC_RTP_AMR, |
| 581 | RSL_IPAC_RTP_CSD, |
| 582 | RSL_IPAC_RTP_MUX, |
| 583 | }; |
| 584 | |
| 585 | /* RSL_IE_IPAC_SPEECH_MODE, lower four bits */ |
| 586 | enum rsl_ipac_speech_mode_s { |
| 587 | RSL_IPAC_SPEECH_GSM_FR = 0, /* GSM FR (Type 1, FS) */ |
| 588 | RSL_IPAC_SPEECH_GSM_EFR = 1, /* GSM EFR (Type 2, FS) */ |
| 589 | RSL_IPAC_SPEECH_GSM_AMR_FR = 2, /* GSM AMR/FR (Type 3, FS) */ |
| 590 | RSL_IPAC_SPEECH_GSM_HR = 3, /* GSM HR (Type 1, HS) */ |
| 591 | RSL_IPAC_SPEECH_GSM_AMR_HR = 5, /* GSM AMR/hr (Type 3, HS) */ |
| 592 | RSL_IPAC_SPEECH_AS_RTP = 0xf, /* As specified by RTP Payload IE */ |
| 593 | }; |
| 594 | /* RSL_IE_IPAC_SPEECH_MODE, upper four bits */ |
| 595 | enum rsl_ipac_speech_mode_m { |
| 596 | RSL_IPAC_SPEECH_M_RXTX = 0, /* Send and Receive */ |
| 597 | RSL_IPAC_SPEECH_M_RX = 1, /* Receive only */ |
| 598 | RSL_IPAC_SPEECH_M_TX = 2, /* Send only */ |
| 599 | }; |
| 600 | |
| 601 | /* RSL_IE_IPAC_RTP_CSD_FMT, lower four bits */ |
| 602 | enum rsl_ipac_rtp_csd_format_d { |
| 603 | RSL_IPAC_RTP_CSD_EXT_TRAU = 0, |
| 604 | RSL_IPAC_RTP_CSD_NON_TRAU = 1, |
| 605 | RSL_IPAC_RTP_CSD_TRAU_BTS = 2, |
| 606 | RSL_IPAC_RTP_CSD_IWF_FREE = 3, |
| 607 | }; |
| 608 | /* RSL_IE_IPAC_RTP_CSD_FMT, upper four bits */ |
| 609 | enum rsl_ipac_rtp_csd_format_ir { |
| 610 | RSL_IPAC_RTP_CSD_IR_8k = 0, |
| 611 | RSL_IPAC_RTP_CSD_IR_16k = 1, |
| 612 | RSL_IPAC_RTP_CSD_IR_32k = 2, |
| 613 | RSL_IPAC_RTP_CSD_IR_64k = 3, |
| 614 | }; |
| 615 | |
| 616 | /* Siemens vendor-specific RSL extensions */ |
| 617 | struct rsl_mrpci { |
| 618 | uint8_t power_class:3, |
| 619 | vgcs_capable:1, |
| 620 | vbs_capable:1, |
| 621 | gsm_phase:2; |
| 622 | } __attribute__ ((packed)); |
| 623 | |
| 624 | enum rsl_mrpci_pwrclass { |
| 625 | RSL_MRPCI_PWRC_1 = 0, |
| 626 | RSL_MRPCI_PWRC_2 = 1, |
| 627 | RSL_MRPCI_PWRC_3 = 2, |
| 628 | RSL_MRPCI_PWRC_4 = 3, |
| 629 | RSL_MRPCI_PWRC_5 = 4, |
| 630 | }; |
| 631 | enum rsl_mrpci_phase { |
| 632 | RSL_MRPCI_PHASE_1 = 0, |
| 633 | /* reserved */ |
| 634 | RSL_MRPCI_PHASE_2 = 2, |
| 635 | RSL_MRPCI_PHASE_2PLUS = 3, |
| 636 | }; |
| 637 | |
Holger Hans Peter Freyther | 0357e9b | 2012-12-06 11:57:31 +0100 | [diff] [blame] | 638 | /* 9.3.20 Release Mode */ |
| 639 | enum rsl_rel_mode { |
| 640 | RSL_REL_NORMAL = 0, |
| 641 | RSL_REL_LOCAL_END = 1, |
| 642 | }; |
| 643 | |
Neels Hofmeyr | 87e4550 | 2017-06-20 00:17:59 +0200 | [diff] [blame] | 644 | /*! ip.access specific embedded information elements */ |
Harald Welte | fad5752 | 2015-12-13 11:56:36 +0100 | [diff] [blame] | 645 | enum rsl_ipac_embedded_ie { |
| 646 | RSL_IPAC_EIE_RXLEV = 0x00, |
| 647 | RSL_IPAC_EIE_RXQUAL = 0x01, |
| 648 | RSL_IPAC_EIE_FREQ_ERR = 0x02, |
| 649 | RSL_IPAC_EIE_TIMING_ERR = 0x03, |
| 650 | RSL_IPAC_EIE_MEAS_AVG_CFG = 0x04, |
| 651 | RSL_IPAC_EIE_BS_PWR_CTL = 0x05, |
| 652 | RSL_IPAC_EIE_MS_PWR_CTL = 0x06, |
| 653 | RSL_IPAC_EIE_HANDO_THRESH = 0x07, |
| 654 | RSL_IPAC_EIE_NCELL_DEFAULTS = 0x08, |
| 655 | RSL_IPAC_EIE_NCELL_LIST = 0x09, |
| 656 | RSL_IPAC_EIE_PC_THRESH_COMP = 0x0a, |
| 657 | RSL_IPAC_EIE_HO_THRESH_COMP = 0x0b, |
| 658 | RSL_IPAC_EIE_HO_CAUSE = 0x0c, |
| 659 | RSL_IPAC_EIE_HO_CANDIDATES = 0x0d, |
| 660 | RSL_IPAC_EIE_NCELL_BA_CHG_LIST = 0x0e, |
| 661 | RSL_IPAC_EIE_NUM_OF_MS = 0x10, |
| 662 | RSL_IPAC_EIE_HO_CAND_EXT = 0x11, |
| 663 | RSL_IPAC_EIE_NCELL_DEF_EXT = 0x12, |
| 664 | RSL_IPAC_EIE_NCELL_LIST_EXT = 0x13, |
| 665 | RSL_IPAC_EIE_MASTER_KEY = 0x14, |
| 666 | RSL_IPAC_EIE_MASTER_SALT = 0x15, |
Minh-Quang Nguyen | 17a8748 | 2016-09-02 11:28:31 -0400 | [diff] [blame] | 667 | /* additional IPAC measurement pre-processing related IEI */ |
| 668 | RSL_IPAC_EIE_MEAS_TRANS_RES = 0x16, |
| 669 | RSL_IPAC_EIE_3G_HO_PARAM = 0x17, |
| 670 | RSL_IPAC_EIE_3G_NCELL_LIST = 0x18, |
| 671 | RSL_IPAC_EIE_SDCCH_CTL_PARAM = 0x1a, |
| 672 | RSL_IPAC_EIE_AMR_CONV_THRESH = 0x1b, |
| 673 | |
| 674 | }; |
| 675 | |
| 676 | struct ipac_preproc_ave_cfg { |
| 677 | uint8_t h_reqave:5, |
| 678 | param_id:2, |
| 679 | reserved:1; |
| 680 | uint8_t h_reqt:5, |
| 681 | ave_method:3; |
| 682 | }__attribute__ ((packed)); |
| 683 | |
| 684 | struct ipac_preproc_ho_thresh { |
| 685 | uint8_t l_rxlev_ul_h:6, |
| 686 | reserved_l_rxlev_ul:2; |
| 687 | uint8_t l_rxlev_dl_h:6, |
| 688 | reserved_l_rxlev_dl:2; |
| 689 | uint8_t rxlev_ul_ih:6, |
| 690 | reserved_rxlev_ul:2; |
| 691 | uint8_t rxlev_dl_ih:6, |
| 692 | reserved_rxlev_dl:2; |
| 693 | uint8_t l_rxqual_ul_h:3, |
| 694 | reserved_rxlqual_ul:1, |
| 695 | l_rxqual_dl_h:3, |
| 696 | reserved_rxqual_dl:1; |
| 697 | uint8_t ms_range_max:6, |
| 698 | reserved_ms_range:2; |
| 699 | }__attribute__ ((packed)); |
| 700 | |
| 701 | struct ipac_preproc_ho_comp { |
| 702 | uint8_t p5:5, |
| 703 | reserved_p5:3; |
| 704 | uint8_t n5:5, |
| 705 | reserved_n5:3; |
| 706 | uint8_t p6:5, |
| 707 | reserved_p6:3; |
| 708 | uint8_t n6:5, |
| 709 | reserved_n6:3; |
| 710 | uint8_t p7:5, |
| 711 | reserved_p7:3; |
| 712 | uint8_t n7:5, |
| 713 | reserved_n7:3; |
| 714 | uint8_t p8:5, |
| 715 | reserved_p8:3; |
| 716 | uint8_t n8:5, |
| 717 | reserved_n8:3; |
| 718 | uint8_t ho_interval:5, |
| 719 | reserved_ho:3; |
| 720 | uint8_t reserved; |
| 721 | |
| 722 | }__attribute__ ((packed)); |
| 723 | |
| 724 | struct ipac_preproc_ho_candidates { |
| 725 | uint8_t bsic:6, |
| 726 | reserved0:2; |
| 727 | uint8_t bcch_freq:5, |
| 728 | ba_used:1, |
| 729 | s:1, |
| 730 | reserved1:1; |
| 731 | }__attribute__ ((packed)); |
| 732 | |
| 733 | struct ipac_preproc_ncell_dflts { |
| 734 | uint8_t rxlev_min_def:6, |
| 735 | reserved_rxlev_min_def:2; |
| 736 | uint8_t ho_margin_def:5, |
| 737 | reserved_ho_margin_def:3; |
| 738 | uint8_t ms_txpwr_max_def:5, |
| 739 | reserved_ms_txpwr_max_def:3; |
| 740 | }__attribute__ ((packed)); |
| 741 | |
Minh-Quang Nguyen | adc28dc | 2017-02-06 11:13:31 -0500 | [diff] [blame] | 742 | struct ipac_preproc_ho_ctl_param { |
| 743 | uint8_t sdcch_ho_gsm:1, |
| 744 | sdcch_ho_umts:1, |
| 745 | reserved:6; |
| 746 | }__attribute__ ((packed)); |
| 747 | |
Minh-Quang Nguyen | 17a8748 | 2016-09-02 11:28:31 -0400 | [diff] [blame] | 748 | struct ipac_preproc_cfg { |
| 749 | uint8_t meas_rep_mode; |
| 750 | uint32_t meas_mode_flags; |
| 751 | struct ipac_preproc_ave_cfg ms_ave_cfg[3]; |
| 752 | struct ipac_preproc_ave_cfg ave_cfg; |
| 753 | struct ipac_preproc_ho_thresh ho_thresh; |
| 754 | struct ipac_preproc_ho_comp ho_comp; |
| 755 | struct ipac_preproc_ncell_dflts ncell_dflts; |
Minh-Quang Nguyen | adc28dc | 2017-02-06 11:13:31 -0500 | [diff] [blame] | 756 | struct ipac_preproc_ho_ctl_param ho_ctl_param; |
Harald Welte | fad5752 | 2015-12-13 11:56:36 +0100 | [diff] [blame] | 757 | }; |
| 758 | |
Sylvain Munaut | dca7d2c | 2012-04-18 21:53:23 +0200 | [diff] [blame] | 759 | /*! @} */ |