diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-05-14 00:39:19 +0800 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-05-14 00:48:09 +0800 |
commit | 3a0a463fa45fa126eb2d46cf7eafb00c0413dbf8 (patch) | |
tree | 027b41618199be75c47612ea816a3d64dd4f7709 /openbsc/src/vty_interface.c | |
parent | 3863e0491869f9aeb449cac028b54fd9d51e4de5 (diff) |
rach: Allow to set the emergency call bit
Add the rach emergency call allowed (0|1) setting and implement
it by directly manipulating the t2 value. It is the third bit which
is set to 0 when emergency calls are enabled and to one if it is
only enabled for access classes 11 to 15.
Diffstat (limited to 'openbsc/src/vty_interface.c')
-rw-r--r-- | openbsc/src/vty_interface.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/openbsc/src/vty_interface.c b/openbsc/src/vty_interface.c index 866131613..6a05137b6 100644 --- a/openbsc/src/vty_interface.c +++ b/openbsc/src/vty_interface.c @@ -383,6 +383,8 @@ static void config_write_bts_single(struct vty *vty, struct gsm_bts *bts) bts->rach_ldavg_slots, VTY_NEWLINE); if (bts->si_common.rach_control.cell_bar) vty_out(vty, " cell barred 1%s", VTY_NEWLINE); + if ((bts->si_common.rach_control.t2 & 0x4) == 0) + vty_out(vty, " rach emergency call allowed 1%s", VTY_NEWLINE); if (is_ipaccess_bts(bts)) { vty_out(vty, " ip.access unit_id %u %u%s", bts->ip_access.site_id, bts->ip_access.bts_id, VTY_NEWLINE); @@ -1469,6 +1471,20 @@ DEFUN(cfg_bts_cell_barred, cfg_bts_cell_barred_cmd, return CMD_SUCCESS; } +DEFUN(cfg_bts_rach_ec_allowed, cfg_bts_rach_ec_allowed_cmd, + "rach emergency call allowed (0|1)", + "Should this cell allow emergency calls?") +{ + struct gsm_bts *bts = vty->index; + + if (atoi(argv[0]) == 0) + bts->si_common.rach_control.t2 |= 0x4; + else + bts->si_common.rach_control.t2 &= ~0x4; + + return CMD_SUCCESS; +} + DEFUN(cfg_bts_ms_max_power, cfg_bts_ms_max_power_cmd, "ms max power <0-40>", "Maximum transmit power of the MS") @@ -1963,6 +1979,7 @@ int bsc_vty_init(struct gsm_network *net) install_element(BTS_NODE, &cfg_bts_rach_nm_b_thresh_cmd); install_element(BTS_NODE, &cfg_bts_rach_nm_ldavg_cmd); install_element(BTS_NODE, &cfg_bts_cell_barred_cmd); + install_element(BTS_NODE, &cfg_bts_rach_ec_allowed_cmd); install_element(BTS_NODE, &cfg_bts_ms_max_power_cmd); install_element(BTS_NODE, &cfg_bts_per_loc_upd_cmd); install_element(BTS_NODE, &cfg_bts_cell_resel_hyst_cmd); |