aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/openbsc/gsm_data.h3
-rw-r--r--src/abis_rsl.c3
-rw-r--r--src/gsm_04_08.c1
-rw-r--r--src/gsm_data.c1
4 files changed, 7 insertions, 1 deletions
diff --git a/include/openbsc/gsm_data.h b/include/openbsc/gsm_data.h
index 11791529a..b4ea22708 100644
--- a/include/openbsc/gsm_data.h
+++ b/include/openbsc/gsm_data.h
@@ -14,6 +14,7 @@
#define TS_MAX_LCHAN 8
#define HARDCODED_ARFCN 123
+#define HARDCODED_TSC 7
enum gsm_hooks {
GSM_HOOK_NM_SWLOAD,
@@ -272,6 +273,8 @@ struct gsm_bts {
u_int8_t nr;
/* location area code of this BTS */
u_int8_t location_area_code;
+ /* Training Sequence Code */
+ u_int8_t tsc;
/* type of BTS */
enum gsm_bts_type type;
/* how do we talk OML with this TRX? */
diff --git a/src/abis_rsl.c b/src/abis_rsl.c
index b56a47c17..8df109c9f 100644
--- a/src/abis_rsl.c
+++ b/src/abis_rsl.c
@@ -424,9 +424,10 @@ int rsl_chan_activate_lchan(struct gsm_lchan *lchan, u_int8_t act_type,
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 05490768a..574e6c15c 100644
--- a/src/gsm_04_08.c
+++ b/src/gsm_04_08.c
@@ -622,6 +622,7 @@ int gsm48_tx_chan_mode_modify(struct gsm_lchan *lchan, u_int8_t mode)
/* 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 d0ce16823..e6447d981 100644
--- a/src/gsm_data.c
+++ b/src/gsm_data.c
@@ -108,6 +108,7 @@ struct gsm_network *gsm_network_init(unsigned int num_bts, enum gsm_bts_type bts
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];