diff options
author | Vadim Yanitskiy <vyanitskiy@sysmocom.de> | 2021-05-26 18:19:03 +0200 |
---|---|---|
committer | Vadim Yanitskiy <vyanitskiy@sysmocom.de> | 2021-05-26 21:18:11 +0200 |
commit | fc02ff459aa5a85624e2ed64b168f582ece410e3 (patch) | |
tree | 5bbfe3511c86320ac896897574e94ddef4ad2b5c | |
parent | 57850ae188bcd3319e337e3da6930b88e705e7ce (diff) |
gsm_08_58.h: add Osmocom specific Bm/Lm CBITs for VAMOS
-rw-r--r-- | include/osmocom/gsm/protocol/gsm_08_58.h | 8 | ||||
-rw-r--r-- | src/gsm/rsl.c | 9 | ||||
-rw-r--r-- | src/gsmtap_util.c | 2 |
3 files changed, 19 insertions, 0 deletions
diff --git a/include/osmocom/gsm/protocol/gsm_08_58.h b/include/osmocom/gsm/protocol/gsm_08_58.h index 97c02e80..9a6e7611 100644 --- a/include/osmocom/gsm/protocol/gsm_08_58.h +++ b/include/osmocom/gsm/protocol/gsm_08_58.h @@ -53,6 +53,10 @@ union abis_rsl_chan_nr { #define ABIS_RSL_CHAN_NR_CBITS_OSMO_CBCH4 0x19 /*< non-standard, for CBCH/SDCCH4 */ #define ABIS_RSL_CHAN_NR_CBITS_OSMO_CBCH8 0x1a /*< non-standard, for CBCH/SDCCH8 */ +/* non-standard, Osmocom specific Bm/Lm equivalents for VAMOS */ +#define ABIS_RSL_CHAN_NR_CBITS_OSMO_VAMOS_Bm_ACCHs 0x1d /*< VAMOS TCH/F */ +#define ABIS_RSL_CHAN_NR_CBITS_OSMO_VAMOS_Lm_ACCHs(ss) (0x1e + (ss)) /*< VAMOS TCH/H */ + /* Link Identifier 9.3.2 */ union abis_rsl_link_id { #if OSMO_IS_BIG_ENDIAN @@ -455,6 +459,10 @@ enum { #define RSL_CHAN_OSMO_CBCH4 0xc8 /*< non-standard, for CBCH/SDCCH4 */ #define RSL_CHAN_OSMO_CBCH8 0xd0 /*< non-standard, for CBCH/SDCCH8 */ +/* non-standard, Osmocom specific Bm/Lm equivalents for VAMOS */ +#define RSL_CHAN_OSMO_VAMOS_Bm_ACCHs 0xe8 /* VAMOS TCH/F */ +#define RSL_CHAN_OSMO_VAMOS_Lm_ACCHs 0xf0 /* VAMOS TCH/H */ + /* Chapter 9.3.3 */ #define RSL_ACT_TYPE_INITIAL 0x00 #define RSL_ACT_TYPE_REACT 0x80 diff --git a/src/gsm/rsl.c b/src/gsm/rsl.c index 706fb548..a7fa81d6 100644 --- a/src/gsm/rsl.c +++ b/src/gsm/rsl.c @@ -159,6 +159,7 @@ uint8_t rsl_enc_chan_nr(uint8_t type, uint8_t subch, uint8_t timeslot) switch (type) { case RSL_CHAN_Lm_ACCHs: + case RSL_CHAN_OSMO_VAMOS_Lm_ACCHs: subch &= 0x01; break; case RSL_CHAN_SDCCH4_ACCH: @@ -195,6 +196,7 @@ int rsl_dec_chan_nr(uint8_t chan_nr, uint8_t *type, uint8_t *subch, uint8_t *tim case RSL_CHAN_OSMO_PDCH: case RSL_CHAN_OSMO_CBCH4: case RSL_CHAN_OSMO_CBCH8: + case RSL_CHAN_OSMO_VAMOS_Bm_ACCHs: *type = chan_nr & RSL_CHAN_NR_MASK; *subch = 0; break; @@ -208,6 +210,9 @@ int rsl_dec_chan_nr(uint8_t chan_nr, uint8_t *type, uint8_t *subch, uint8_t *tim } else if ((chan_nr & 0xc0) == RSL_CHAN_SDCCH8_ACCH) { *type = RSL_CHAN_SDCCH8_ACCH; *subch = (chan_nr >> 3) & 0x7; + } else if ((chan_nr & 0xf0) == RSL_CHAN_OSMO_VAMOS_Lm_ACCHs) { + *type = RSL_CHAN_OSMO_VAMOS_Lm_ACCHs; + *subch = (chan_nr >> 3) & 0x1; } else return -EINVAL; } @@ -246,6 +251,10 @@ char *rsl_chan_nr_str_buf(char *buf, size_t buf_len, uint8_t chan_nr) snprintf(buf, buf_len, "CBCH(SDCCH/4) on TS%d", ts); else if (cbits == ABIS_RSL_CHAN_NR_CBITS_OSMO_CBCH8) snprintf(buf, buf_len, "CBCH(SDCCH/8) on TS%d", ts); + else if (cbits == ABIS_RSL_CHAN_NR_CBITS_OSMO_VAMOS_Bm_ACCHs) + snprintf(buf, buf_len, "VAMOS TCH/F on TS%d", ts); + else if ((cbits & 0x1e) == ABIS_RSL_CHAN_NR_CBITS_OSMO_VAMOS_Lm_ACCHs(0)) + snprintf(buf, buf_len, "VAMOS TCH/H(%u) on TS%d", cbits & 0x01, ts); else snprintf(buf, buf_len, "UNKNOWN on TS%d", ts); diff --git a/src/gsmtap_util.c b/src/gsmtap_util.c index 336e1d03..9ae06d64 100644 --- a/src/gsmtap_util.c +++ b/src/gsmtap_util.c @@ -63,12 +63,14 @@ uint8_t chantype_rsl2gsmtap2(uint8_t rsl_chantype, uint8_t link_id, bool user_pl switch (rsl_chantype) { case RSL_CHAN_Bm_ACCHs: + case RSL_CHAN_OSMO_VAMOS_Bm_ACCHs: if (user_plane) ret = GSMTAP_CHANNEL_VOICE_F; else ret = GSMTAP_CHANNEL_FACCH_F; break; case RSL_CHAN_Lm_ACCHs: + case RSL_CHAN_OSMO_VAMOS_Lm_ACCHs: if (user_plane) ret = GSMTAP_CHANNEL_VOICE_H; else |