make sure all channels in one BTS use the same TSC (training sequence code)
diff --git a/src/abis_rsl.c b/src/abis_rsl.c
index b56a47c..8df109c 100644
--- a/src/abis_rsl.c
+++ b/src/abis_rsl.c
@@ -424,9 +424,10 @@
return -1;
}
+ memset(&ci, 0, sizeof(ci));
ci.chan_desc.iei = 0x64;
ci.chan_desc.chan_nr = chan_nr;
- ci.chan_desc.oct3 = (TSC << 5) | ((arfcn & 0x3ff) >> 8);
+ ci.chan_desc.oct3 = (lchan->ts->trx->bts->tsc << 5) | ((arfcn & 0x3ff) >> 8);
ci.chan_desc.oct4 = arfcn & 0xff;
dh = (struct abis_rsl_dchan_hdr *) msgb_put(msg, sizeof(*dh));
diff --git a/src/gsm_04_08.c b/src/gsm_04_08.c
index 0549076..574e6c1 100644
--- a/src/gsm_04_08.c
+++ b/src/gsm_04_08.c
@@ -622,6 +622,7 @@
/* fill the channel information element, this code
* should probably be shared with rsl_rx_chan_rqd() */
cmm->chan_desc.chan_nr = lchan2chan_nr(lchan);
+ cmm->chan_desc.h0.tsc = lchan->ts->trx->bts->tsc;
cmm->chan_desc.h0.h = 0;
cmm->chan_desc.h0.arfcn_high = arfcn >> 8;
cmm->chan_desc.h0.arfcn_low = arfcn & 0xff;
diff --git a/src/gsm_data.c b/src/gsm_data.c
index d0ce168..e6447d9 100644
--- a/src/gsm_data.c
+++ b/src/gsm_data.c
@@ -108,6 +108,7 @@
bts->network = net;
bts->nr = i;
bts->type = bts_type;
+ bts->tsc = HARDCODED_TSC;
for (j = 0; j < BTS_MAX_TRX; j++) {
struct gsm_bts_trx *trx = &bts->trx[j];