diff options
author | Harald Welte <laforge@gnumonks.org> | 2010-06-14 22:47:37 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2010-06-20 10:44:53 +0200 |
commit | c2fb3d0c3d0e8b12db01db70ca718914a6caad92 (patch) | |
tree | 26375b01e245e397d0ffcdfca50409158dea5157 /openbsc/src | |
parent | f3d8e92731dbdc05ed4214ab9ff2bbb9189f42ad (diff) |
[BSC] Make sure we only enable hopping on BTS that support it
Diffstat (limited to 'openbsc/src')
-rw-r--r-- | openbsc/src/bsc_vty.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/openbsc/src/bsc_vty.c b/openbsc/src/bsc_vty.c index 46a13d36a..68a059749 100644 --- a/openbsc/src/bsc_vty.c +++ b/openbsc/src/bsc_vty.c @@ -2015,8 +2015,15 @@ DEFUN(cfg_ts_hopping, "Disable frequency hopping\n" "Enable frequency hopping\n") { struct gsm_bts_trx_ts *ts = vty->index; + int enabled = atoi(argv[0]); - ts->hopping.enabled = atoi(argv[0]); + if (enabled && !gsm_bts_has_feature(ts->trx->bts, BTS_FEAT_HOPPING)) { + vty_out(vty, "BTS model does not support hopping%s", + VTY_NEWLINE); + return CMD_WARNING; + } + + ts->hopping.enabled = enabled; return CMD_SUCCESS; } |