aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2015-11-20 10:43:31 +0100
committerHarald Welte <laforge@gnumonks.org>2015-11-20 10:43:31 +0100
commita2bbc5ec0e6481bb5b65da7bdbde03a424437af4 (patch)
tree9833ff4c1d87c96db2df8a81fe4b9aa4ce584ed4 /openbsc/include
parentae2c18c57b5b8d2133a42297fb7ce02a8f332cce (diff)
Fix TSC/BSIC handling bug and remove bts->tsc
This fixes a bug in the following circumstances: * BSIC is set to 0 in the config file * No TSC is explicitly specified at the BST level in the config file In this case, we ended up using BSIC=0 and TSC=7, as TSC=7 is our default initialization value. The TSC of the CCCH/BCCH must always be the BCC, which is the lower 3 bits of the BSIC. Having configuration options for both the BSIC _and_ the TSC at the BTS level therefore makes no sense, as it only adds ways in which users can configure non-oprational configurations. So we remove the bts->tsc member, and keep only the ts->tsc members that allow us to configure a timeslot-specific TSC that's different from the BTS TSC (= BCC).
Diffstat (limited to 'openbsc/include')
-rw-r--r--openbsc/include/openbsc/gsm_data.h2
-rw-r--r--openbsc/include/openbsc/gsm_data_shared.h8
2 files changed, 4 insertions, 6 deletions
diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h
index c167c494a..6d7aba358 100644
--- a/openbsc/include/openbsc/gsm_data.h
+++ b/openbsc/include/openbsc/gsm_data.h
@@ -437,7 +437,7 @@ void subscr_con_free(struct gsm_subscriber_connection *conn);
struct gsm_bts *gsm_bts_alloc_register(struct gsm_network *net,
enum gsm_bts_type type,
- uint8_t tsc, uint8_t bsic);
+ uint8_t bsic);
void set_ts_e1link(struct gsm_bts_trx_ts *ts, uint8_t e1_nr,
uint8_t e1_ts, uint8_t e1_ts_ss);
diff --git a/openbsc/include/openbsc/gsm_data_shared.h b/openbsc/include/openbsc/gsm_data_shared.h
index be3333ca1..1b7382d5c 100644
--- a/openbsc/include/openbsc/gsm_data_shared.h
+++ b/openbsc/include/openbsc/gsm_data_shared.h
@@ -50,7 +50,6 @@ enum gsm_chreq_reason_t {
#define TS_MAX_LCHAN 8
#define HARDCODED_ARFCN 123
-#define HARDCODED_TSC 7
#define HARDCODED_BSIC 0x3f /* NCC = 7 / BCC = 7 */
/* for multi-drop config */
@@ -569,9 +568,8 @@ struct gsm_bts {
uint16_t cell_identity;
/* location area code of this BTS */
uint16_t location_area_code;
- /* Training Sequence Code */
- uint8_t tsc;
- /* Base Station Identification Code (BSIC) */
+ /* Base Station Identification Code (BSIC), lower 3 bits is BCC,
+ * which is used as TSC for the CCCH */
uint8_t bsic;
/* type of BTS */
enum gsm_bts_type type;
@@ -798,7 +796,7 @@ static inline uint8_t gsm_ts_tsc(const struct gsm_bts_trx_ts *ts)
if (ts->tsc != -1)
return ts->tsc;
else
- return ts->trx->bts->tsc;
+ return ts->trx->bts->bsic & 7;
}