From 510931a1d858e941a3347789272637a111f78c9f Mon Sep 17 00:00:00 2001 From: Andreas Eversberg Date: Mon, 16 Dec 2013 21:50:37 +0100 Subject: 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 Change-Id: Icc5ff58aee3a1a4705e38839bd5cdf6bf7e30f03 --- .../layer23/include/osmocom/bb/mobile/settings.h | 3 +- src/host/layer23/src/mobile/gsm322.c | 2 +- src/host/layer23/src/mobile/gsm48_rr.c | 9 ++-- src/host/layer23/src/mobile/vty_interface.c | 58 ++++++++++++++++++---- 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 4e5d5a19..03cc2c85 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/settings.h +++ b/src/host/layer23/include/osmocom/bb/mobile/settings.h @@ -49,7 +49,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 e058a808..eea19911 100644 --- a/src/host/layer23/src/mobile/gsm322.c +++ b/src/host/layer23/src/mobile/gsm322.c @@ -4451,7 +4451,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 1d2745b6..4af23712 100644 --- a/src/host/layer23/src/mobile/gsm48_rr.c +++ b/src/host/layer23/src/mobile/gsm48_rr.c @@ -1768,8 +1768,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; } @@ -1781,7 +1784,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, "\n"); diff --git a/src/host/layer23/src/mobile/vty_interface.c b/src/host/layer23/src/mobile/vty_interface.c index 15eb2415..334ff65c 100644 --- a/src/host/layer23/src/mobile/vty_interface.c +++ b/src/host/layer23/src/mobile/vty_interface.c @@ -1435,9 +1435,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", @@ -2199,27 +2202,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); @@ -2959,8 +2993,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_any_timeout_cmd); install_element(MS_NODE, &cfg_ms_sms_store_cmd); install_element(MS_NODE, &cfg_ms_no_sms_store_cmd); -- cgit v1.2.3