summaryrefslogtreecommitdiffstats
path: root/openbsc
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2013-03-16 16:31:26 +0100
committerHarald Welte <laforge@gnumonks.org>2013-03-17 14:37:16 +0100
commit0c8f9ca30bafdc571f1f93361c6193c45d727aed (patch)
treed07f5d147f1b4a2c0937aed76bc9aa18093d29c7 /openbsc
parent7159e8bea3e39bf74ec26356f7317df5d540b77a (diff)
Add VTY option to set GPRS network-control-order to enable MS measurements
In order to enable GPRS downlink measurements at mobile, the network-control-order must be set to nc1.
Diffstat (limited to 'openbsc')
-rw-r--r--openbsc/include/openbsc/gsm_data_shared.h1
-rw-r--r--openbsc/src/libbsc/bsc_vty.c23
-rw-r--r--openbsc/src/libbsc/system_information.c1
3 files changed, 25 insertions, 0 deletions
diff --git a/openbsc/include/openbsc/gsm_data_shared.h b/openbsc/include/openbsc/gsm_data_shared.h
index 83758b127..f5ab47327 100644
--- a/openbsc/include/openbsc/gsm_data_shared.h
+++ b/openbsc/include/openbsc/gsm_data_shared.h
@@ -658,6 +658,7 @@ struct gsm_bts {
} cell;
struct gsm_bts_gprs_nsvc nsvc[2];
uint8_t rac;
+ uint8_t net_ctrl_ord;
} gprs;
/* RACH NM values */
diff --git a/openbsc/src/libbsc/bsc_vty.c b/openbsc/src/libbsc/bsc_vty.c
index 8027a630a..0875e1a8a 100644
--- a/openbsc/src/libbsc/bsc_vty.c
+++ b/openbsc/src/libbsc/bsc_vty.c
@@ -418,6 +418,8 @@ static void config_write_bts_gprs(struct vty *vty, struct gsm_bts *bts)
vty_out(vty, " gprs routing area %u%s", bts->gprs.rac,
VTY_NEWLINE);
+ vty_out(vty, " gprs network-control-order nc%u%s",
+ bts->gprs.net_ctrl_ord, VTY_NEWLINE);
vty_out(vty, " gprs cell bvci %u%s", bts->gprs.cell.bvci,
VTY_NEWLINE);
for (i = 0; i < ARRAY_SIZE(bts->gprs.cell.timer); i++)
@@ -2288,6 +2290,26 @@ DEFUN(cfg_bts_gprs_rac, cfg_bts_gprs_rac_cmd,
return CMD_SUCCESS;
}
+DEFUN(cfg_bts_gprs_net_ctrl_ord, cfg_bts_gprs_net_ctrl_ord_cmd,
+ "gprs network-control-order (nc0|nc1|nc2)",
+ GPRS_TEXT
+ "GPRS Network Control Order\n"
+ "MS controlled cell re-selection, no measurement reporting\n"
+ "MS controlled cell re-selection, MS sends measurement reports\n"
+ "Network controlled cell re-selection, MS sends measurement reports\n")
+{
+ struct gsm_bts *bts = vty->index;
+
+ if (bts->gprs.mode == BTS_GPRS_NONE) {
+ vty_out(vty, "%% GPRS not enabled on this BTS%s", VTY_NEWLINE);
+ return CMD_WARNING;
+ }
+
+ bts->gprs.net_ctrl_ord = atoi(argv[0] + 2);
+
+ return CMD_SUCCESS;
+}
+
DEFUN(cfg_bts_gprs_mode, cfg_bts_gprs_mode_cmd,
"gprs mode (none|gprs|egprs)",
GPRS_TEXT
@@ -3082,6 +3104,7 @@ int bsc_vty_init(const struct log_info *cat)
install_element(BTS_NODE, &cfg_bts_gprs_mode_cmd);
install_element(BTS_NODE, &cfg_bts_gprs_ns_timer_cmd);
install_element(BTS_NODE, &cfg_bts_gprs_rac_cmd);
+ install_element(BTS_NODE, &cfg_bts_gprs_net_ctrl_ord_cmd);
install_element(BTS_NODE, &cfg_bts_gprs_bvci_cmd);
install_element(BTS_NODE, &cfg_bts_gprs_cell_timer_cmd);
install_element(BTS_NODE, &cfg_bts_gprs_nsei_cmd);
diff --git a/openbsc/src/libbsc/system_information.c b/openbsc/src/libbsc/system_information.c
index acf713414..88b81dcb1 100644
--- a/openbsc/src/libbsc/system_information.c
+++ b/openbsc/src/libbsc/system_information.c
@@ -791,6 +791,7 @@ static int generate_si13(uint8_t *output, struct gsm_bts *bts)
si13->header.system_information = GSM48_MT_RR_SYSINFO_13;
si13_default.no_pbcch.rac = bts->gprs.rac;
+ si13_default.no_pbcch.net_ctrl_ord = bts->gprs.net_ctrl_ord;
ret = rest_octets_si13(si13->rest_octets, &si13_default);
if (ret < 0)