summaryrefslogtreecommitdiffstats
path: root/src/host/layer23
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2013-12-16 21:50:37 +0100
committerAndreas Eversberg <jolly@eversberg.eu>2014-02-26 12:17:09 +0100
commit447ac935c571bb410b1f7b8467619abac92c7201 (patch)
tree5e0adf1891b4e12e1c7bc17b2f413b6e473467ba /src/host/layer23
parent89c43f4867c424244a4f771c381539e0f1882e2e (diff)
mobile: VTY provides two options to disable neighbor cell measurements
1. "no neighbor-measurement idle": neighbor cell measurement for cell re-selection 2. "no neighbor-measurement dedicated": neighbor cell measurement for handover
Diffstat (limited to 'src/host/layer23')
-rw-r--r--src/host/layer23/include/osmocom/bb/mobile/settings.h3
-rw-r--r--src/host/layer23/src/mobile/gsm322.c2
-rw-r--r--src/host/layer23/src/mobile/gsm48_rr.c9
-rw-r--r--src/host/layer23/src/mobile/vty_interface.c58
4 files changed, 56 insertions, 16 deletions
diff --git a/src/host/layer23/include/osmocom/bb/mobile/settings.h b/src/host/layer23/include/osmocom/bb/mobile/settings.h
index f3ac7969..34533b82 100644
--- a/src/host/layer23/include/osmocom/bb/mobile/settings.h
+++ b/src/host/layer23/include/osmocom/bb/mobile/settings.h
@@ -52,7 +52,8 @@ struct gsm_settings {
uint16_t stick_arfcn;
uint8_t skip_max_per_band;
uint8_t no_lupd;
- uint8_t no_neighbour;
+ uint8_t no_nb_idle;
+ uint8_t no_nb_dedicated;
/* supported by configuration */
uint8_t cc_dtmf;
diff --git a/src/host/layer23/src/mobile/gsm322.c b/src/host/layer23/src/mobile/gsm322.c
index 4b1e1c38..87c4694e 100644
--- a/src/host/layer23/src/mobile/gsm322.c
+++ b/src/host/layer23/src/mobile/gsm322.c
@@ -4443,7 +4443,7 @@ static int gsm322_nb_start(struct osmocom_ms *ms, int synced)
int refer_pcs, index;
uint16_t arfcn;
- if (cs->ms->settings.no_neighbour)
+ if (cs->ms->settings.no_nb_idle)
return 0;
if (synced)
diff --git a/src/host/layer23/src/mobile/gsm48_rr.c b/src/host/layer23/src/mobile/gsm48_rr.c
index e94b43c7..6dd2bf3b 100644
--- a/src/host/layer23/src/mobile/gsm48_rr.c
+++ b/src/host/layer23/src/mobile/gsm48_rr.c
@@ -1764,8 +1764,11 @@ static int gsm48_new_si5(struct osmocom_ms *ms)
return -EIO;
/* start neigbour cell measurement and sync task */
- LOGP(DRR, LOGL_INFO, "Sending list of neighbour cells to layer1.\n");
- l1ctl_tx_neigh_pm_req(ms, n, rrmeas->nc_arfcn);
+ if (!ms->settings.no_nb_dedicated) {
+ LOGP(DNB, LOGL_INFO, "Sending list of neighbour cells to "
+ "layer1.\n");
+ l1ctl_tx_neigh_pm_req(ms, n, rrmeas->nc_arfcn);
+ }
return n;
}
@@ -1777,7 +1780,7 @@ int gsm48_rr_meas_ind(struct osmocom_ms *ms, uint16_t band_arfcn,
struct gsm48_rr_meas *rrmeas = &rr->meas;
int i;
- LOGP(DRR, LOGL_INFO, "Measurement result: arfcn=%s lev=%s bsic=",
+ LOGP(DNB, LOGL_INFO, "Measurement result: arfcn=%s lev=%s bsic=",
gsm_print_arfcn(band_arfcn), gsm_print_rxlev(rx_lev));
if (bsic == L1CTL_BSIC_INVAL)
LOGPC(DNB, LOGL_INFO, "<unknown>\n");
diff --git a/src/host/layer23/src/mobile/vty_interface.c b/src/host/layer23/src/mobile/vty_interface.c
index b1ee65b5..1e942e8f 100644
--- a/src/host/layer23/src/mobile/vty_interface.c
+++ b/src/host/layer23/src/mobile/vty_interface.c
@@ -1397,9 +1397,12 @@ static void config_write_ms(struct vty *vty, struct osmocom_ms *ms)
if (!hide_default || set->no_lupd)
vty_out(vty, " %slocation-updating%s",
(set->no_lupd) ? "no " : "", VTY_NEWLINE);
- if (!hide_default || set->no_neighbour)
- vty_out(vty, " %sneighbour-measurement%s",
- (set->no_neighbour) ? "no " : "", VTY_NEWLINE);
+ if (!hide_default || set->no_nb_idle)
+ vty_out(vty, " %sneighbor-measurement idle%s",
+ (set->no_nb_idle) ? "no " : "", VTY_NEWLINE);
+ if (!hide_default || set->no_nb_dedicated)
+ vty_out(vty, " %sneighbor-measurement dedicated%s",
+ (set->no_nb_dedicated) ? "no " : "", VTY_NEWLINE);
if (set->full_v1 || set->full_v2 || set->full_v3) {
/* mandatory anyway */
vty_out(vty, " codec full-speed%s%s",
@@ -2137,27 +2140,58 @@ DEFUN(cfg_no_abbrev, cfg_ms_no_abbrev_cmd, "no abbrev [ABBREVIATION]",
return CMD_SUCCESS;
}
-DEFUN(cfg_ms_neighbour, cfg_ms_neighbour_cmd, "neighbour-measurement",
- "Allow neighbour cell measurement in idle mode")
+#define MS_NB_STR "Allow neighbor cell measurement\n"
+#define NO_MS_NB_STR NO_STR "Do not allow neighbor cell measurement\n"
+
+DEFUN(cfg_ms_nb_idle, cfg_ms_nb_idle_cmd, "neighbor-measurement idle",
+ MS_NB_STR "Idle mode")
+{
+ struct osmocom_ms *ms = vty->index;
+ struct gsm_settings *set = &ms->settings;
+
+ set->no_nb_idle = 0;
+
+ vty_restart_if_started(vty, ms);
+
+ return CMD_SUCCESS;
+}
+
+DEFUN(cfg_ms_no_nb_idle, cfg_ms_no_nb_idle_cmd,
+ "no neighbor-measurement idle",
+ NO_MS_NB_STR "Idle mode")
{
struct osmocom_ms *ms = vty->index;
struct gsm_settings *set = &ms->settings;
- set->no_neighbour = 0;
+ set->no_nb_idle = 1;
vty_restart_if_started(vty, ms);
+ return CMD_SUCCESS;
+}
+
+DEFUN(cfg_ms_nb_dedicated, cfg_ms_nb_dedicated_cmd,
+ "neighbor-measurement dedicated",
+ MS_NB_STR "Dedicated mode")
+{
+ struct osmocom_ms *ms = vty->index;
+ struct gsm_settings *set = &ms->settings;
+
+ set->no_nb_dedicated = 0;
+
+ vty_restart_if_started(vty, ms);
return CMD_SUCCESS;
}
-DEFUN(cfg_ms_no_neighbour, cfg_ms_no_neighbour_cmd, "no neighbour-measurement",
- NO_STR "Do not allow neighbour cell measurement in idle mode")
+DEFUN(cfg_ms_no_nb_dedicated, cfg_ms_no_nb_dedicated_cmd,
+ "no neighbor-measurement dedicated",
+ NO_MS_NB_STR "Dedicated mode")
{
struct osmocom_ms *ms = vty->index;
struct gsm_settings *set = &ms->settings;
- set->no_neighbour = 1;
+ set->no_nb_dedicated = 1;
vty_restart_if_started(vty, ms);
@@ -2919,8 +2953,10 @@ int ms_vty_init(void)
install_element(MS_NODE, &cfg_ms_abbrev_cmd);
install_element(MS_NODE, &cfg_ms_no_abbrev_cmd);
install_element(MS_NODE, &cfg_ms_testsim_cmd);
- install_element(MS_NODE, &cfg_ms_neighbour_cmd);
- install_element(MS_NODE, &cfg_ms_no_neighbour_cmd);
+ install_element(MS_NODE, &cfg_ms_nb_idle_cmd);
+ install_element(MS_NODE, &cfg_ms_no_nb_idle_cmd);
+ install_element(MS_NODE, &cfg_ms_nb_dedicated_cmd);
+ install_element(MS_NODE, &cfg_ms_no_nb_dedicated_cmd);
install_element(MS_NODE, &cfg_ms_support_cmd);
install_node(&support_node, config_write_dummy);
install_default(SUPPORT_NODE);