make sure all channels in one BTS use the same TSC (training sequence code)

This commit is contained in:
Harald Welte 2009-02-28 13:11:07 +00:00
parent 3cc4bf517f
commit 02b0e093a1
4 changed files with 7 additions and 1 deletions

View File

@ -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? */

View File

@ -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));

View File

@ -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;

View File

@ -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];