aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include
diff options
context:
space:
mode:
Diffstat (limited to 'openbsc/include')
-rw-r--r--openbsc/include/openbsc/abis_rsl.h15
-rw-r--r--openbsc/include/openbsc/gsm_04_08.h18
-rw-r--r--openbsc/include/openbsc/gsm_data.h5
3 files changed, 25 insertions, 13 deletions
diff --git a/openbsc/include/openbsc/abis_rsl.h b/openbsc/include/openbsc/abis_rsl.h
index 9e4d59078..a2a01d321 100644
--- a/openbsc/include/openbsc/abis_rsl.h
+++ b/openbsc/include/openbsc/abis_rsl.h
@@ -266,16 +266,23 @@ struct rsl_ie_chan_mode {
} __attribute__ ((packed));
#define RSL_CMOD_DTXu 0x01 /* uplink */
#define RSL_CMOD_DTXd 0x02 /* downlink */
-#define RSL_CMOD_SPD_SPEECH 0x01
-#define RSL_CMOD_SPD_DATA 0x02
-#define RSL_CMOD_SPD_SIGN 0x03
+enum rsl_cmod_spd {
+ RSL_CMOD_SPD_SPEECH = 0x01,
+ RSL_CMOD_SPD_DATA = 0x02,
+ RSL_CMOD_SPD_SIGN = 0x03,
+};
#define RSL_CMOD_CRT_SDCCH 0x01
#define RSL_CMOD_CRT_TCH_Bm 0x08 /* full-rate */
#define RSL_CMOD_CRT_TCH_Lm 0x09 /* half-rate */
/* FIXME: More CRT types */
+/* Speech */
#define RSL_CMOD_SP_GSM1 0x01
#define RSL_CMOD_SP_GSM2 0x11
#define RSL_CMOD_SP_GSM3 0x21
+/* Data */
+#define RSL_CMOD_SP_NT_14k5 0x58
+#define RSL_CMOD_SP_NT_12k0 0x50
+#define RSL_CMOD_SP_NT_6k0 0x51
/* Chapter 9.3.5 */
struct rsl_ie_chan_ident {
@@ -459,7 +466,7 @@ int rsl_chan_activate(struct gsm_bts_trx *trx, u_int8_t chan_nr,
u_int8_t bs_power, u_int8_t ms_power,
u_int8_t ta);
int rsl_chan_activate_lchan(struct gsm_lchan *lchan, u_int8_t act_type,
- u_int8_t ta, u_int8_t mode);
+ u_int8_t ta);
int rsl_chan_mode_modify_req(struct gsm_lchan *ts);
int rsl_paging_cmd(struct gsm_bts *bts, u_int8_t paging_group, u_int8_t len,
u_int8_t *ms_ident, u_int8_t chan_needed);
diff --git a/openbsc/include/openbsc/gsm_04_08.h b/openbsc/include/openbsc/gsm_04_08.h
index a885d5ae7..c93540b14 100644
--- a/openbsc/include/openbsc/gsm_04_08.h
+++ b/openbsc/include/openbsc/gsm_04_08.h
@@ -48,14 +48,16 @@ struct gsm48_chan_mode_modify {
u_int8_t mode;
} __attribute__ ((packed));
-#define GSM48_CMODE_SIGN 0x00
-#define GSM48_CMODE_SPEECH_V1 0x01
-#define GSM48_CMODE_SPEECH_EFR 0x21
-#define GSM48_CMODE_SPEECH_AMR 0x41
-#define GSM48_CMODE_DATA_14k5 0x0f
-#define GSM48_CMODE_DATA_12k0 0x03
-#define GSM48_CMODE_DATA_6k0 0x0b
-#define GSM48_CMODE_DATA_3k6 0x23
+enum gsm48_chan_mode {
+ GSM48_CMODE_SIGN = 0x00,
+ GSM48_CMODE_SPEECH_V1 = 0x01,
+ GSM48_CMODE_SPEECH_EFR = 0x21,
+ GSM48_CMODE_SPEECH_AMR = 0x41,
+ GSM48_CMODE_DATA_14k5 = 0x0f,
+ GSM48_CMODE_DATA_12k0 = 0x03,
+ GSM48_CMODE_DATA_6k0 = 0x0b,
+ GSM48_CMODE_DATA_3k6 = 0x23,
+};
/* Chapter 9.1.18 */
struct gsm48_imm_ass {
diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h
index e6dffa8f2..84e3c79e1 100644
--- a/openbsc/include/openbsc/gsm_data.h
+++ b/openbsc/include/openbsc/gsm_data.h
@@ -41,6 +41,7 @@ enum gsm_chreq_reason_t {
#include <openbsc/timer.h>
#include <openbsc/gsm_04_08.h>
+#include <openbsc/abis_rsl.h>
#include <openbsc/mncc.h>
#include <openbsc/tlv.h>
@@ -165,8 +166,10 @@ struct gsm_lchan {
u_int8_t nr;
/* The logical channel type */
enum gsm_chan_t type;
+ /* RSL channel mode */
+ enum rsl_cmod_spd rsl_cmode;
/* If TCH, traffic channel mode */
- enum gsm_chan_t tch_mode;
+ enum gsm48_chan_mode tch_mode;
/* Power levels for MS and BTS */
u_int8_t bs_power;
u_int8_t ms_power;