diff options
Diffstat (limited to 'openbsc/src/abis_nm.c')
-rw-r--r-- | openbsc/src/abis_nm.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/openbsc/src/abis_nm.c b/openbsc/src/abis_nm.c index 8fcfdba4e..a75ef7a1e 100644 --- a/openbsc/src/abis_nm.c +++ b/openbsc/src/abis_nm.c @@ -404,6 +404,23 @@ static const struct tlv_definition nm_att_tlvdef = { }, }; +static const enum abis_nm_chan_comb chcomb4pchan[] = { + [GSM_PCHAN_CCCH] = NM_CHANC_mainBCCH, + [GSM_PCHAN_CCCH_SDCCH4] = NM_CHANC_BCCHComb, + [GSM_PCHAN_TCH_F] = NM_CHANC_TCHFull, + [GSM_PCHAN_TCH_H] = NM_CHANC_TCHHalf, + [GSM_PCHAN_SDCCH8_SACCH8C] = NM_CHANC_SDCCH, + /* FIXME: bounds check */ +}; + +int abis_nm_chcomb4pchan(enum gsm_phys_chan_config pchan) +{ + if (pchan < ARRAY_SIZE(chcomb4pchan)) + return chcomb4pchan[pchan]; + + return -EINVAL; +} + int abis_nm_tlv_parse(struct tlv_parsed *tp, const u_int8_t *buf, int len) { return tlv_parse(tp, &nm_att_tlvdef, buf, len, 0, 0); |