aboutsummaryrefslogtreecommitdiffstats
path: root/src/chan_alloc.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2008-12-27 01:55:51 +0000
committerHarald Welte <laforge@gnumonks.org>2008-12-27 01:55:51 +0000
commit4b634544e6ac1d09efeae804269ed8cb808bd98e (patch)
tree70cdf31bfa1aa66094bb150ed9339b961f3fc8a2 /src/chan_alloc.c
parentfaaa49ca5136bc805b26240e783a09115b8ce075 (diff)
now we get up to the SETUP of MO calls
Diffstat (limited to 'src/chan_alloc.c')
-rw-r--r--src/chan_alloc.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/chan_alloc.c b/src/chan_alloc.c
index ca8690899..4ef5ff902 100644
--- a/src/chan_alloc.c
+++ b/src/chan_alloc.c
@@ -27,6 +27,7 @@
#include <openbsc/gsm_data.h>
#include <openbsc/chan_alloc.h>
+#include <openbsc/abis_nm.h>
struct gsm_bts_trx_ts *ts_c0_alloc(struct gsm_bts *bts,
enum gsm_phys_chan_config pchan)
@@ -46,6 +47,14 @@ struct gsm_bts_trx_ts *ts_c0_alloc(struct gsm_bts *bts,
return ts;
}
+static const enum abis_nm_chan_comb chcomb4pchan[] = {
+ [GSM_PCHAN_CCCH] = NM_CHANC_mainBCCH,
+ [GSM_PCHAN_CCCH_SDCCH4] = NM_CHANC_BCCCHComb,
+ [GSM_PCHAN_TCH_F] = NM_CHANC_TCHFull,
+ [GSM_PCHAN_TCH_H] = NM_CHANC_TCHHalf,
+ [GSM_PCHAN_SDCCH8_SACCH8C] = NM_CHANC_SDCCH,
+ /* FIXME: bounds check */
+};
/* Allocate a logical channel (TS) */
struct gsm_bts_trx_ts *ts_alloc(struct gsm_bts *bts,
@@ -58,6 +67,8 @@ struct gsm_bts_trx_ts *ts_alloc(struct gsm_bts *bts,
struct gsm_bts_trx_ts *ts = &trx->ts[j];
if (ts->pchan == GSM_PCHAN_NONE) {
ts->pchan = pchan;
+ /* set channel attribute on OML */
+ abis_nm_set_channel_attr(ts, chcomb4pchan[pchan]);
return ts;
}
}