Remove bogus MM INFO configuration
The network name and other MM INFO is controlled by the MSC, not the BSC. Change-Id: I1cbf72fc50cff29e7c1633ba752cbf15b4b84c58
This commit is contained in:
parent
c499e5c62e
commit
8311a81bae
|
@ -1,9 +1,6 @@
|
|||
network
|
||||
network country code 901
|
||||
mobile network code 70
|
||||
mm info 1
|
||||
short name OsmoBSC
|
||||
long name OsmoBSC
|
||||
bts 0
|
||||
type sysmobts
|
||||
band GSM-1800
|
||||
|
|
|
@ -6,12 +6,9 @@ e1_input
|
|||
network
|
||||
network country code 1
|
||||
mobile network code 1
|
||||
short name OsmoBSC
|
||||
long name OsmoBSC
|
||||
encryption a5 0
|
||||
neci 0
|
||||
paging any use tch 0
|
||||
mm info 0
|
||||
handover 0
|
||||
handover window rxlev averaging 10
|
||||
handover window rxqual averaging 1
|
||||
|
|
|
@ -5,12 +5,9 @@ e1_input
|
|||
network
|
||||
network country code 1
|
||||
mobile network code 1
|
||||
short name OsmoBSC
|
||||
long name OsmoBSC
|
||||
encryption a5 0
|
||||
neci 0
|
||||
paging any use tch 0
|
||||
mm info 0
|
||||
handover 0
|
||||
handover window rxlev averaging 10
|
||||
handover window rxqual averaging 1
|
||||
|
|
|
@ -278,8 +278,6 @@ struct gsm_network {
|
|||
/* global parameters */
|
||||
uint16_t country_code;
|
||||
uint16_t network_code;
|
||||
char *name_long;
|
||||
char *name_short;
|
||||
int a5_encryption;
|
||||
int neci;
|
||||
int send_mm_info;
|
||||
|
|
|
@ -30,45 +30,8 @@
|
|||
#include <osmocom/bsc/osmo_bsc_rf.h>
|
||||
#include <osmocom/bsc/bsc_msc_data.h>
|
||||
|
||||
#define CTRL_CMD_VTY_STRING(cmdname, cmdstr, dtype, element) \
|
||||
CTRL_HELPER_GET_STRING(cmdname, dtype, element) \
|
||||
CTRL_HELPER_SET_STRING(cmdname, dtype, element) \
|
||||
static struct ctrl_cmd_element cmd_##cmdname = { \
|
||||
.name = cmdstr, \
|
||||
.get = get_##cmdname, \
|
||||
.set = set_##cmdname, \
|
||||
.verify = verify_vty_description_string, \
|
||||
}
|
||||
|
||||
/**
|
||||
* Check that there are no newlines or comments or other things
|
||||
* that could make the VTY configuration unparsable.
|
||||
*/
|
||||
static int verify_vty_description_string(struct ctrl_cmd *cmd,
|
||||
const char *value, void *data)
|
||||
{
|
||||
int i;
|
||||
const size_t len = strlen(value);
|
||||
|
||||
for (i = 0; i < len; ++i) {
|
||||
switch(value[i]) {
|
||||
case '#':
|
||||
case '\n':
|
||||
case '\r':
|
||||
cmd->reply = "String includes illegal character";
|
||||
return -1;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
CTRL_CMD_DEFINE_RANGE(net_mnc, "mnc", struct gsm_network, network_code, 0, 999);
|
||||
CTRL_CMD_DEFINE_RANGE(net_mcc, "mcc", struct gsm_network, country_code, 1, 999);
|
||||
CTRL_CMD_VTY_STRING(net_short_name, "short-name", struct gsm_network, name_short);
|
||||
CTRL_CMD_VTY_STRING(net_long_name, "long-name", struct gsm_network, name_long);
|
||||
|
||||
static int set_net_apply_config(struct ctrl_cmd *cmd, void *data)
|
||||
{
|
||||
|
@ -452,8 +415,6 @@ int bsc_base_ctrl_cmds_install(void)
|
|||
int rc = 0;
|
||||
rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_mnc);
|
||||
rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_mcc);
|
||||
rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_short_name);
|
||||
rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_long_name);
|
||||
rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_apply_config);
|
||||
rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_mcc_mnc_apply);
|
||||
rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_rf_lock);
|
||||
|
|
|
@ -536,9 +536,6 @@ int bsc_network_alloc(void)
|
|||
if (!bsc_gsmnet)
|
||||
return -ENOMEM;
|
||||
|
||||
bsc_gsmnet->name_long = talloc_strdup(bsc_gsmnet, "OpenBSC");
|
||||
bsc_gsmnet->name_short = talloc_strdup(bsc_gsmnet, "OpenBSC");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -167,10 +167,6 @@ static void net_dump_vty(struct vty *vty, struct gsm_network *net)
|
|||
vty_out(vty, "BSC is on Country Code %u, Network Code %u "
|
||||
"and has %u BTS%s", net->country_code, net->network_code,
|
||||
net->num_bts, VTY_NEWLINE);
|
||||
vty_out(vty, " Long network name: '%s'%s",
|
||||
net->name_long, VTY_NEWLINE);
|
||||
vty_out(vty, " Short network name: '%s'%s",
|
||||
net->name_short, VTY_NEWLINE);
|
||||
vty_out(vty, "%s", VTY_NEWLINE);
|
||||
vty_out(vty, " Encryption: A5/%u%s", net->a5_encryption,
|
||||
VTY_NEWLINE);
|
||||
|
@ -178,8 +174,6 @@ static void net_dump_vty(struct vty *vty, struct gsm_network *net)
|
|||
VTY_NEWLINE);
|
||||
vty_out(vty, " Use TCH for Paging any: %d%s", net->pag_any_tch,
|
||||
VTY_NEWLINE);
|
||||
vty_out(vty, " MM Info: %s%s", net->send_mm_info ? "On" : "Off",
|
||||
VTY_NEWLINE);
|
||||
vty_out(vty, " Handover: %s%s", net->handover.active ? "On" : "Off",
|
||||
VTY_NEWLINE);
|
||||
network_chan_load(&pl, net);
|
||||
|
@ -806,12 +800,9 @@ static int config_write_net(struct vty *vty)
|
|||
vty_out(vty, "network%s", VTY_NEWLINE);
|
||||
vty_out(vty, " network country code %u%s", gsmnet->country_code, VTY_NEWLINE);
|
||||
vty_out(vty, " mobile network code %u%s", gsmnet->network_code, VTY_NEWLINE);
|
||||
vty_out(vty, " short name %s%s", gsmnet->name_short, VTY_NEWLINE);
|
||||
vty_out(vty, " long name %s%s", gsmnet->name_long, VTY_NEWLINE);
|
||||
vty_out(vty, " encryption a5 %u%s", gsmnet->a5_encryption, VTY_NEWLINE);
|
||||
vty_out(vty, " neci %u%s", gsmnet->neci, VTY_NEWLINE);
|
||||
vty_out(vty, " paging any use tch %d%s", gsmnet->pag_any_tch, VTY_NEWLINE);
|
||||
vty_out(vty, " mm info %u%s", gsmnet->send_mm_info, VTY_NEWLINE);
|
||||
vty_out(vty, " handover %u%s", gsmnet->handover.active, VTY_NEWLINE);
|
||||
vty_out(vty, " handover window rxlev averaging %u%s",
|
||||
gsmnet->handover.win_rxlev_avg, VTY_NEWLINE);
|
||||
|
|
|
@ -80,28 +80,6 @@ DEFUN(cfg_net_mnc,
|
|||
return CMD_SUCCESS;
|
||||
}
|
||||
|
||||
DEFUN(cfg_net_name_short,
|
||||
cfg_net_name_short_cmd,
|
||||
"short name NAME",
|
||||
"Set the short GSM network name\n" NAME_CMD_STR NAME_STR)
|
||||
{
|
||||
struct gsm_network *gsmnet = gsmnet_from_vty(vty);
|
||||
|
||||
osmo_talloc_replace_string(gsmnet, &gsmnet->name_short, argv[0]);
|
||||
return CMD_SUCCESS;
|
||||
}
|
||||
|
||||
DEFUN(cfg_net_name_long,
|
||||
cfg_net_name_long_cmd,
|
||||
"long name NAME",
|
||||
"Set the long GSM network name\n" NAME_CMD_STR NAME_STR)
|
||||
{
|
||||
struct gsm_network *gsmnet = gsmnet_from_vty(vty);
|
||||
|
||||
osmo_talloc_replace_string(gsmnet, &gsmnet->name_long, argv[0]);
|
||||
return CMD_SUCCESS;
|
||||
}
|
||||
|
||||
DEFUN(cfg_net_encryption,
|
||||
cfg_net_encryption_cmd,
|
||||
"encryption a5 (0|1|2|3)",
|
||||
|
@ -117,19 +95,6 @@ DEFUN(cfg_net_encryption,
|
|||
return CMD_SUCCESS;
|
||||
}
|
||||
|
||||
DEFUN(cfg_net_mm_info, cfg_net_mm_info_cmd,
|
||||
"mm info (0|1)",
|
||||
"Mobility Management\n"
|
||||
"Send MM INFO after LOC UPD ACCEPT\n"
|
||||
"Disable\n" "Enable\n")
|
||||
{
|
||||
struct gsm_network *gsmnet = gsmnet_from_vty(vty);
|
||||
|
||||
gsmnet->send_mm_info = atoi(argv[0]);
|
||||
|
||||
return CMD_SUCCESS;
|
||||
}
|
||||
|
||||
DEFUN(cfg_net_dyn_ts_allow_tch_f,
|
||||
cfg_net_dyn_ts_allow_tch_f_cmd,
|
||||
"dyn_ts_allow_tch_f (0|1)",
|
||||
|
@ -246,10 +211,7 @@ int common_cs_vty_init(struct gsm_network *network,
|
|||
install_node(&net_node, config_write_net);
|
||||
install_element(GSMNET_NODE, &cfg_net_ncc_cmd);
|
||||
install_element(GSMNET_NODE, &cfg_net_mnc_cmd);
|
||||
install_element(GSMNET_NODE, &cfg_net_name_short_cmd);
|
||||
install_element(GSMNET_NODE, &cfg_net_name_long_cmd);
|
||||
install_element(GSMNET_NODE, &cfg_net_encryption_cmd);
|
||||
install_element(GSMNET_NODE, &cfg_net_mm_info_cmd);
|
||||
install_element(GSMNET_NODE, &cfg_net_timezone_cmd);
|
||||
install_element(GSMNET_NODE, &cfg_net_timezone_dst_cmd);
|
||||
install_element(GSMNET_NODE, &cfg_net_no_timezone_cmd);
|
||||
|
|
Loading…
Reference in New Issue