aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@netfilter.org>2009-12-21 23:08:18 +0100
committerHarald Welte <laforge@netfilter.org>2009-12-21 23:08:18 +0100
commit713550120cb9231de49090c01abb6e867a93137d (patch)
treeeb3826d7fdade3d9b0cbf8f49dc374ee4a24b944
parent1394fea03f888408616cac3a669191f2e6923c8f (diff)
remove duplicate flag for cell barring
it's sufficient if we keep the state of cell barring in one place
-rw-r--r--openbsc/include/openbsc/gsm_data.h1
-rw-r--r--openbsc/src/bsc_init.c4
-rw-r--r--openbsc/src/vty_interface.c6
3 files changed, 4 insertions, 7 deletions
diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h
index 87695582..9d2549ca 100644
--- a/openbsc/include/openbsc/gsm_data.h
+++ b/openbsc/include/openbsc/gsm_data.h
@@ -381,7 +381,6 @@ struct gsm_bts {
/* should the channel allocator allocate channels from high TRX to TRX0,
* rather than starting from TRX0 and go upwards? */
int chan_alloc_reverse;
- int cell_barred;
/* maximum Tx power that the MS is permitted to use in this cell */
int ms_max_power;
diff --git a/openbsc/src/bsc_init.c b/openbsc/src/bsc_init.c
index 48d90d70..86a93a1a 100644
--- a/openbsc/src/bsc_init.c
+++ b/openbsc/src/bsc_init.c
@@ -804,7 +804,7 @@ static int bootstrap_bts(struct gsm_bts *bts)
}
if (bts->network->auth_policy == GSM_AUTH_POLICY_ACCEPT_ALL &&
- !bts->cell_barred)
+ !bts->si_common.rach_control.cell_bar)
LOGP(DNM, LOG_ERROR, "\nWARNING: You are running an 'accept-all' "
"network on a BTS that is not barred. This "
"configuration is likely to interfere with production "
@@ -815,8 +815,6 @@ static int bootstrap_bts(struct gsm_bts *bts)
bts->si_common.chan_desc.att = 1;
bts->si_common.chan_desc.ccch_conf = RSL_BCCH_CCCH_CONF_1_C;
bts->si_common.chan_desc.bs_pa_mfrms = RSL_BS_PA_MFRMS_5;
- if (bts->cell_barred)
- bts->si_common.rach_control.cell_bar = 1;
/* T3212 is set from vty/config */
/* some defaults for our system information */
diff --git a/openbsc/src/vty_interface.c b/openbsc/src/vty_interface.c
index 0e518efd..b13dc5f5 100644
--- a/openbsc/src/vty_interface.c
+++ b/openbsc/src/vty_interface.c
@@ -140,7 +140,7 @@ static void bts_dump_vty(struct vty *vty, struct gsm_bts *bts)
VTY_NEWLINE);
vty_out(vty, "Cell Reselection Hysteresis: %u dBm%s",
bts->si_common.cell_sel_par.cell_resel_hyst*2, VTY_NEWLINE);
- if (bts->cell_barred)
+ if (bts->si_common.rach_control.cell_bar)
vty_out(vty, " CELL IS BARRED%s", VTY_NEWLINE);
if (is_ipaccess_bts(bts))
vty_out(vty, " Unit ID: %u/%u/0, OML Stream ID 0x%02x%s",
@@ -258,7 +258,7 @@ static void config_write_bts_single(struct vty *vty, struct gsm_bts *bts)
vty_out(vty, " channel allocator %s%s",
bts->chan_alloc_reverse ? "descending" : "ascending",
VTY_NEWLINE);
- if (bts->cell_barred)
+ if (bts->si_common.rach_control.cell_bar)
vty_out(vty, " cell barred 1%s", VTY_NEWLINE);
if (is_ipaccess_bts(bts)) {
vty_out(vty, " ip.access unit_id %u %u%s",
@@ -1202,7 +1202,7 @@ DEFUN(cfg_bts_cell_barred, cfg_bts_cell_barred_cmd,
{
struct gsm_bts *bts = vty->index;
- bts->cell_barred = atoi(argv[0]);
+ bts->si_common.rach_control.cell_bar = atoi(argv[0]);
return CMD_SUCCESS;
}