summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHolger Freyther <zecke@selfish.org>2009-06-02 03:25:14 +0000
committerHolger Freyther <zecke@selfish.org>2009-06-02 03:25:14 +0000
commitb8be6543cdcd9d734eeb045dd282ce7ef6315364 (patch)
treec715ed8dcf2abf83a0455a9a98f502e704e34382 /src
parent79f4ae6cc3c52194ce9ee396e6cc8b7fff74cb5a (diff)
[e1] Correctly initialize the e1link (Andreas Eversberg)
During bootstrap of BS11, the e1links are initialized. This must also be done when BS11 is already bootstrapped (when restarting OpenBSC). It is required to correctly multiplex the audio traffic between channels. Without it, all time slots refer to card 0, slot 0, subslot 0, which causes crashes when handling TRAU frames..
Diffstat (limited to 'src')
-rw-r--r--src/bsc_hack.c32
1 files changed, 24 insertions, 8 deletions
diff --git a/src/bsc_hack.c b/src/bsc_hack.c
index a8fd53771..c80ffd583 100644
--- a/src/bsc_hack.c
+++ b/src/bsc_hack.c
@@ -497,7 +497,6 @@ static void bootstrap_om_bs11(struct gsm_bts *bts)
/* Connect signalling of bts0/trx0 to e1_0/ts1/64kbps */
abis_nm_conn_terr_sign(trx, 0, 1, 0xff);
- set_ts_e1link(&trx->ts[0], 0, 1, 0xff);
abis_nm_raw_msg(bts, sizeof(msg_6), msg_6); /* SET TRX ATTRIBUTES */
/* Use TEI 1 for signalling */
@@ -514,43 +513,36 @@ static void bootstrap_om_bs11(struct gsm_bts *bts)
/* SET CHANNEL ATTRIBUTE TS1 */
abis_nm_set_channel_attr(&trx->ts[1], NM_CHANC_TCHFull);
/* Connect traffic of bts0/trx0/ts1 to e1_0/ts2/b */
- set_ts_e1link(&trx->ts[1], 0, 2, 1);
abis_nm_conn_terr_traf(&trx->ts[1], 0, 2, 1);
/* SET CHANNEL ATTRIBUTE TS2 */
abis_nm_set_channel_attr(&trx->ts[2], NM_CHANC_TCHFull);
/* Connect traffic of bts0/trx0/ts2 to e1_0/ts2/c */
- set_ts_e1link(&trx->ts[2], 0, 2, 2);
abis_nm_conn_terr_traf(&trx->ts[2], 0, 2, 2);
/* SET CHANNEL ATTRIBUTE TS3 */
abis_nm_set_channel_attr(&trx->ts[3], NM_CHANC_TCHFull);
/* Connect traffic of bts0/trx0/ts3 to e1_0/ts2/d */
- set_ts_e1link(&trx->ts[3], 0, 2, 3);
abis_nm_conn_terr_traf(&trx->ts[3], 0, 2, 3);
/* SET CHANNEL ATTRIBUTE TS4 */
abis_nm_set_channel_attr(&trx->ts[4], NM_CHANC_TCHFull);
/* Connect traffic of bts0/trx0/ts4 to e1_0/ts3/a */
- set_ts_e1link(&trx->ts[4], 0, 3, 0);
abis_nm_conn_terr_traf(&trx->ts[4], 0, 3, 0);
/* SET CHANNEL ATTRIBUTE TS5 */
abis_nm_set_channel_attr(&trx->ts[5], NM_CHANC_TCHFull);
/* Connect traffic of bts0/trx0/ts5 to e1_0/ts3/b */
- set_ts_e1link(&trx->ts[5], 0, 3, 1);
abis_nm_conn_terr_traf(&trx->ts[5], 0, 3, 1);
/* SET CHANNEL ATTRIBUTE TS6 */
abis_nm_set_channel_attr(&trx->ts[6], NM_CHANC_TCHFull);
/* Connect traffic of bts0/trx0/ts6 to e1_0/ts3/c */
- set_ts_e1link(&trx->ts[6], 0, 3, 2);
abis_nm_conn_terr_traf(&trx->ts[6], 0, 3, 2);
/* SET CHANNEL ATTRIBUTE TS7 */
abis_nm_set_channel_attr(&trx->ts[7], NM_CHANC_TCHFull);
/* Connect traffic of bts0/trx0/ts7 to e1_0/ts3/d */
- set_ts_e1link(&trx->ts[7], 0, 3, 3);
abis_nm_conn_terr_traf(&trx->ts[7], 0, 3, 3);
/* end DB transmission */
@@ -936,6 +928,30 @@ static int bootstrap_bts(struct gsm_bts *bts)
paging_init(bts);
+ if (bts->type == GSM_BTS_TYPE_BS11) {
+ struct gsm_bts_trx *trx = &bts->trx[0];
+ set_ts_e1link(&trx->ts[0], 0, 1, 0xff);
+ set_ts_e1link(&trx->ts[1], 0, 2, 1);
+ set_ts_e1link(&trx->ts[2], 0, 2, 2);
+ set_ts_e1link(&trx->ts[3], 0, 2, 3);
+ set_ts_e1link(&trx->ts[4], 0, 3, 0);
+ set_ts_e1link(&trx->ts[5], 0, 3, 1);
+ set_ts_e1link(&trx->ts[6], 0, 3, 2);
+ set_ts_e1link(&trx->ts[7], 0, 3, 3);
+#ifdef HAVE_TRX1
+ /* TRX 1 */
+ trx = &bts->trx[1];
+ set_ts_e1link(&trx->ts[0], 0, 1, 0xff);
+ set_ts_e1link(&trx->ts[1], 0, 2, 1);
+ set_ts_e1link(&trx->ts[2], 0, 2, 2);
+ set_ts_e1link(&trx->ts[3], 0, 2, 3);
+ set_ts_e1link(&trx->ts[4], 0, 3, 0);
+ set_ts_e1link(&trx->ts[5], 0, 3, 1);
+ set_ts_e1link(&trx->ts[6], 0, 3, 2);
+ set_ts_e1link(&trx->ts[7], 0, 3, 3);
+#endif
+ }
+
return 0;
}