diff options
author | Andreas Eversberg <jolly@eversberg.eu> | 2013-12-16 21:50:37 +0100 |
---|---|---|
committer | Andreas Eversberg <jolly@eversberg.eu> | 2016-09-25 08:11:44 +0200 |
commit | 57fbd7699751ad705d9658688b38cf6c9226f7f1 (patch) | |
tree | 2ca78fb8ca5fe9a58f36bbd54ab5a0946822feb4 /src/host | |
parent | 423012e1768380d5fbecab2da93936743ad96b1b (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')
-rw-r--r-- | src/host/layer23/include/osmocom/bb/mobile/settings.h | 3 | ||||
-rw-r--r-- | src/host/layer23/src/mobile/gsm322.c | 2 | ||||
-rw-r--r-- | src/host/layer23/src/mobile/gsm48_rr.c | 13 | ||||
-rw-r--r-- | src/host/layer23/src/mobile/vty_interface.c | 58 |
4 files changed, 58 insertions, 18 deletions
diff --git a/src/host/layer23/include/osmocom/bb/mobile/settings.h b/src/host/layer23/include/osmocom/bb/mobile/settings.h index cdf63237..cb1cac4a 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/settings.h +++ b/src/host/layer23/include/osmocom/bb/mobile/settings.h @@ -46,7 +46,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 cccf474a..f537f077 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 c1c81b32..3257557d 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,12 +1780,12 @@ 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 > 0x3f) - LOGPC(DRR, LOGL_INFO, "<unknown>\n"); + LOGPC(DNB, LOGL_INFO, "<unknown>\n"); else - LOGPC(DRR, LOGL_INFO, "%d,%d\n", bsic >> 3, bsic & 7); + LOGPC(DNB, LOGL_INFO, "%d,%d\n", bsic >> 3, bsic & 7); for (i = 0; i < rrmeas->nc_num; i++) { if (rrmeas->nc_arfcn[i] == band_arfcn) { diff --git a/src/host/layer23/src/mobile/vty_interface.c b/src/host/layer23/src/mobile/vty_interface.c index 5e71f293..22eb036f 100644 --- a/src/host/layer23/src/mobile/vty_interface.c +++ b/src/host/layer23/src/mobile/vty_interface.c @@ -1427,9 +1427,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", @@ -2170,27 +2173,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); @@ -2953,8 +2987,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); |