diff options
author | Harald Welte <laforge@gnumonks.org> | 2009-07-29 16:42:16 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2009-07-29 16:42:16 +0200 |
commit | 67b4c30a9de972d199830bba5535e934bd47ac0f (patch) | |
tree | 0652cb43ed3cb3e66443f1f430b1dbb85c26ff1e /openbsc/src/e1_config.c | |
parent | 9943c5bbac1e0ce99bd597f3e4ae665ce42118c5 (diff) |
complete TRX1 support for BS11
* remove old HAVE_TRX1 definition, replace it with '-1' commandline argument
* make sure we actually configure the OML TRX attributes with a different
ARFCN than TRX0
* make sure we configure timeslot 0 of TRX1 also in TCH/F mode
This code is untested, but if you have a dual-trx BS-11, and the second TRX
is activated, you should be able to run bsc_hack with the -1 option to enable
and use the second trx. It works like this:
* TRX1 shares E1 timeslot 0 for signalling
* TRX1 RSL link uses TEI2 (TRX0 uses 1)
* TRX1 on ARFCN+2, i.e. if you have TRX0 on 122, TRX1 will be 124
Diffstat (limited to 'openbsc/src/e1_config.c')
-rw-r--r-- | openbsc/src/e1_config.c | 44 |
1 files changed, 29 insertions, 15 deletions
diff --git a/openbsc/src/e1_config.c b/openbsc/src/e1_config.c index 9c9f40cff..addc9fe50 100644 --- a/openbsc/src/e1_config.c +++ b/openbsc/src/e1_config.c @@ -24,6 +24,7 @@ int e1_config(struct gsm_bts *bts, int cardnr, int release_l2) struct e1inp_line *line; struct e1inp_ts *sign_ts; struct e1inp_sign_link *oml_link, *rsl_link; + struct gsm_bts_trx *trx = bts->c0; line = talloc_zero(tall_bsc_ctx, struct e1inp_line); if (!line) @@ -37,13 +38,13 @@ int e1_config(struct gsm_bts *bts, int cardnr, int release_l2) /* create signalling links for TS1 */ sign_ts = &line->ts[1-1]; oml_link = e1inp_sign_link_create(sign_ts, E1INP_SIGN_OML, - bts->c0, TEI_OML, SAPI_OML); + trx, TEI_OML, SAPI_OML); rsl_link = e1inp_sign_link_create(sign_ts, E1INP_SIGN_RSL, - bts->c0, TEI_RSL, SAPI_RSL); + trx, TEI_RSL, SAPI_RSL); /* create back-links from bts/trx */ bts->oml_link = oml_link; - bts->c0->rsl_link = rsl_link; + trx->rsl_link = rsl_link; /* enable subchannel demuxer on TS2 */ subch_demux_activate(&line->ts[2-1].trau.demux, 1); @@ -56,18 +57,31 @@ int e1_config(struct gsm_bts *bts, int cardnr, int release_l2) subch_demux_activate(&line->ts[3-1].trau.demux, 2); subch_demux_activate(&line->ts[3-1].trau.demux, 3); -#ifdef HAVE_TRX1 - /* create E1 timeslots for TRAU frames of TRX1 */ - e1inp_ts_config(&line->ts[4-1], line, E1INP_TS_TYPE_TRAU); - e1inp_ts_config(&line->ts[5-1], line, E1INP_TS_TYPE_TRAU); - - /* create RSL signalling link for TRX1 */ - sign_ts = &line->ts[1-1]; - rsl_link = e1inp_sign_link_create(sign_ts, E1INP_SIGN_RSL, - &bts->trx[1], TEI_RSL+1, SAPI_RSL); - /* create back-links from trx */ - bts->trx[1].rsl_link = rsl_link; -#endif + trx = gsm_bts_trx_num(bts, 1); + if (trx) { + /* create E1 timeslots for TRAU frames of TRX1 */ + e1inp_ts_config(&line->ts[4-1], line, E1INP_TS_TYPE_TRAU); + e1inp_ts_config(&line->ts[5-1], line, E1INP_TS_TYPE_TRAU); + + /* create RSL signalling link for TRX1 */ + sign_ts = &line->ts[1-1]; + rsl_link = e1inp_sign_link_create(sign_ts, E1INP_SIGN_RSL, + trx, TEI_RSL+1, SAPI_RSL); + /* create back-links from trx */ + trx->rsl_link = rsl_link; + + /* enable subchannel demuxer on TS2 */ + subch_demux_activate(&line->ts[4-1].trau.demux, 0); + subch_demux_activate(&line->ts[4-1].trau.demux, 1); + subch_demux_activate(&line->ts[4-1].trau.demux, 2); + subch_demux_activate(&line->ts[4-1].trau.demux, 3); + + /* enable subchannel demuxer on TS3 */ + subch_demux_activate(&line->ts[5-1].trau.demux, 0); + subch_demux_activate(&line->ts[5-1].trau.demux, 1); + subch_demux_activate(&line->ts[5-1].trau.demux, 2); + subch_demux_activate(&line->ts[5-1].trau.demux, 3); + } return mi_setup(cardnr, line, release_l2); } |