diff options
author | Harald Welte <laforge@gnumonks.org> | 2009-07-29 15:41:29 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2009-07-29 15:41:29 +0200 |
commit | 9943c5bbac1e0ce99bd597f3e4ae665ce42118c5 (patch) | |
tree | 7ca65b8eaa226d2f25b26ae465aa497138d8be83 /openbsc/include/openbsc/gsm_04_08.h | |
parent | 58ca5b7ae70365c1285b2ea0cb3c3370a8f108a9 (diff) |
generalize channel activation / channel mode modify
* we only need one piece of code to calculate rsl_ie_chan_mode from
our run-time data structures (gsm_lchan)
* add some more channel modes for TCH/H and data
* use enum's to make the compiler warn us about unhandled enum values
* make sure the caller determines the (signalling,speech,data) mode
Diffstat (limited to 'openbsc/include/openbsc/gsm_04_08.h')
-rw-r--r-- | openbsc/include/openbsc/gsm_04_08.h | 18 |
1 files changed, 10 insertions, 8 deletions
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 { |