aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Freyther <zecke@selfish.org>2009-02-04 00:04:52 +0000
committerHolger Freyther <zecke@selfish.org>2009-02-04 00:04:52 +0000
commit1adb4ff0022116a989c059b1131f2ce0a7f0fd12 (patch)
treed10ae0294d18bb9d723735a4c7914a619a704cc0
parentb01554493f3154ea90b275ce5706392c5c232248 (diff)
[paging] Keep a copy of the Control Channel Description in the bts struct
- Initialize Control Channel Description of SI3 - Patch the table - Setting ATT now is easy - Paging can now extract all required information... to determine the right paging group.
-rw-r--r--include/openbsc/gsm_04_08.h14
-rw-r--r--include/openbsc/gsm_data.h3
-rw-r--r--src/bsc_hack.c11
3 files changed, 27 insertions, 1 deletions
diff --git a/include/openbsc/gsm_04_08.h b/include/openbsc/gsm_04_08.h
index e44b061e2..8033942e3 100644
--- a/include/openbsc/gsm_04_08.h
+++ b/include/openbsc/gsm_04_08.h
@@ -2,6 +2,7 @@
#define _GSM_04_08_H
/* GSM TS 04.08 definitions */
+struct gsm_lchan;
/* Chapter 10.5.2.5 */
struct gsm48_chan_desc {
@@ -86,6 +87,17 @@ struct gsm48_rach_control {
u_int8_t t3;
} __attribute__ ((packed));
+/* Section 10.5.2.11 Control Channel Description , Figure 10.5.33 */
+struct gsm48_control_channel_descr {
+ u_int8_t ccch_conf :3,
+ bs_ag_blks_res :3,
+ att :1,
+ spare1 :1;
+ u_int8_t bs_pa_mfrms : 3,
+ spare2 :5;
+ u_int8_t t3212;
+} __attribute__ ((packed));
+
/* Section 9.2.9 CM service request */
struct gsm48_service_request {
u_int8_t cm_service_type : 4,
@@ -118,7 +130,7 @@ struct gsm48_system_information_type_3 {
struct gsm48_system_information_type_header header;
u_int16_t cell_identity;
struct gsm48_loc_area_id lai;
- u_int8_t control_channel_description[3];
+ struct gsm48_control_channel_descr control_channel_desc;
u_int8_t cell_options;
u_int8_t cell_selection[2];
struct gsm48_rach_control rach_control;
diff --git a/include/openbsc/gsm_data.h b/include/openbsc/gsm_data.h
index 2173c51c5..621f11604 100644
--- a/include/openbsc/gsm_data.h
+++ b/include/openbsc/gsm_data.h
@@ -4,6 +4,7 @@
#include <sys/types.h>
#include <openbsc/timer.h>
+#include <openbsc/gsm_04_08.h>
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
@@ -191,6 +192,8 @@ struct gsm_bts {
/* number of this BTS on given E1 link */
u_int8_t bts_nr;
+ struct gsm48_control_channel_descr chan_desc;
+
/* CCCH is on C0 */
struct gsm_bts_trx *c0;
/* transceivers */
diff --git a/src/bsc_hack.c b/src/bsc_hack.c
index db8a68345..8d02d8939 100644
--- a/src/bsc_hack.c
+++ b/src/bsc_hack.c
@@ -642,6 +642,9 @@ static void patch_tables(struct gsm_bts *bts)
type_4->data[2] &= 0xf0;
type_4->data[2] |= arfcn_high;
type_4->data[3] = arfcn_low;
+
+ /* patch Control Channel Description 10.5.2.11 */
+ type_3->control_channel_desc = bts->chan_desc;
}
@@ -681,6 +684,14 @@ static int bootstrap_network(void)
bts = &gsmnet->bts[0];
bts->location_area_code = 1;
bts->trx[0].arfcn = ARFCN;
+
+ /* Control Channel Description */
+ memset(&bts->chan_desc, 0, sizeof(struct gsm48_control_channel_descr));
+ bts->chan_desc.att = 0;
+ bts->chan_desc.ccch_conf = RSL_BCCH_CCCH_CONF_1_C;
+ bts->chan_desc.bs_pa_mfrms = RSL_BS_PA_MFRMS_5;
+ bts->chan_desc.t3212 = 0;
+
patch_tables(bts);
paging_bts = page_allocate(bts);