diff options
author | Harald Welte (local) <laflocal@hanuman.gnumonks.org> | 2009-08-12 13:28:23 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2009-08-12 20:55:00 +0200 |
commit | 5dececfa4184021fd349a7ede5190e0ae67d31f0 (patch) | |
tree | afe5f04a4175d9d1d978e21f6804312c347ed71c /openbsc/src/bsc_hack.c | |
parent | 69de397ff406acb8a6ea23811c50d3af3a53acb0 (diff) |
implement bts->cell_barred feature, configurable in VTY
Diffstat (limited to 'openbsc/src/bsc_hack.c')
-rw-r--r-- | openbsc/src/bsc_hack.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/openbsc/src/bsc_hack.c b/openbsc/src/bsc_hack.c index d08c145fe..7ff633330 100644 --- a/openbsc/src/bsc_hack.c +++ b/openbsc/src/bsc_hack.c @@ -872,6 +872,10 @@ static void patch_tables(struct gsm_bts *bts) u_int8_t arfcn_low = bts->c0->arfcn & 0xff; u_int8_t arfcn_high = (bts->c0->arfcn >> 8) & 0x0f; /* covert the raw packet to the struct */ + struct gsm48_system_information_type_1 *type_1 = + (struct gsm48_system_information_type_1*)&si1; + struct gsm48_system_information_type_2 *type_2 = + (struct gsm48_system_information_type_2*)&si2; struct gsm48_system_information_type_3 *type_3 = (struct gsm48_system_information_type_3*)&si3; struct gsm48_system_information_type_4 *type_4 = @@ -923,6 +927,18 @@ static void patch_tables(struct gsm_bts *bts) /* patch MS max power for CCH */ type_4->cell_sel_par.ms_txpwr_max_ccch = ms_pwr_ctl_lvl(bts->band, 20 /* dBm == 100mW */); + + if (bts->cell_barred) { + type_1->rach_control.cell_bar = 1; + type_2->rach_control.cell_bar = 1; + type_3->rach_control.cell_bar = 1; + type_4->rach_control.cell_bar = 1; + } else { + type_1->rach_control.cell_bar = 0; + type_2->rach_control.cell_bar = 0; + type_3->rach_control.cell_bar = 0; + type_4->rach_control.cell_bar = 0; + } } |