gsm_08_58.h: add Osmocom specific Bm/Lm CBITs for VAMOS

Change-Id: If33c1695922d110c0d2c60d5c0136caf2587194e
Related: SYS#4895, OS#4941, SYS#5315, OS#4940
This commit is contained in:
Vadim Yanitskiy 2021-05-26 18:19:03 +02:00
parent 57850ae188
commit fc02ff459a
3 changed files with 19 additions and 0 deletions

View File

@ -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

View File

@ -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);

View File

@ -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