aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2012-01-29 13:24:12 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2012-09-17 13:25:52 +0200
commite17666f4860595d61518ac99f9d05d78761e5ba0 (patch)
tree19b044aadf6aa00b1f4820530be0c2d4ee5ef5df
parent5be919e9d834115122adf6ba3742eb0369d1d642 (diff)
ARFCNs are in the range of 0..1023, not 0..1024
I'm sure I read somewhere that it actually was 0..1024, as I kept wondering how stupid it was to use 10bit+1. However, that source was incorrect, as GSM TS 05.05 quite clearly states 0..1023
-rw-r--r--openbsc/src/libbsc/bsc_init.c4
-rw-r--r--openbsc/src/libbsc/bsc_vty.c6
2 files changed, 5 insertions, 5 deletions
diff --git a/openbsc/src/libbsc/bsc_init.c b/openbsc/src/libbsc/bsc_init.c
index 9c74a54d4..b15c3af88 100644
--- a/openbsc/src/libbsc/bsc_init.c
+++ b/openbsc/src/libbsc/bsc_init.c
@@ -208,7 +208,7 @@ static int generate_ma_for_ts(struct gsm_bts_trx_ts *ts)
/* count the number of ARFCNs in the cell channel allocation */
num_cell_arfcns = 0;
- for (i = 1; i < 1024; i++) {
+ for (i = 0; i < 1024; i++) {
if (bitvec_get_bit_pos(cell_chan, i))
num_cell_arfcns++;
}
@@ -219,7 +219,7 @@ static int generate_ma_for_ts(struct gsm_bts_trx_ts *ts)
ts->hopping.ma_len++;
n_chan = 0;
- for (i = 1; i < 1024; i++) {
+ for (i = 0; i < 1024; i++) {
if (!bitvec_get_bit_pos(cell_chan, i))
continue;
/* set the corresponding bit in the MA */
diff --git a/openbsc/src/libbsc/bsc_vty.c b/openbsc/src/libbsc/bsc_vty.c
index e1ca65294..3d9da2ab8 100644
--- a/openbsc/src/libbsc/bsc_vty.c
+++ b/openbsc/src/libbsc/bsc_vty.c
@@ -2242,7 +2242,7 @@ DEFUN(cfg_bts_neigh_mode, cfg_bts_neigh_mode_cmd,
}
DEFUN(cfg_bts_neigh, cfg_bts_neigh_cmd,
- "neighbor-list (add|del) arfcn <0-1024>",
+ "neighbor-list (add|del) arfcn <0-1023>",
"Neighbor List\n" "Add to manual neighbor list\n"
"Delete from manual neighbor list\n" "ARFCN of neighbor\n"
"ARFCN of neighbor\n")
@@ -2266,7 +2266,7 @@ DEFUN(cfg_bts_neigh, cfg_bts_neigh_cmd,
}
DEFUN(cfg_bts_si5_neigh, cfg_bts_si5_neigh_cmd,
- "si5 neighbor-list (add|del) arfcn <0-1024>",
+ "si5 neighbor-list (add|del) arfcn <0-1023>",
"SI5 Neighbor List\n" "Add to manual SI5 neighbor list\n"
"Delete from SI5 manual neighbor list\n" "ARFCN of neighbor\n"
"ARFCN of neighbor\n")
@@ -2346,7 +2346,7 @@ DEFUN(cfg_trx,
DEFUN(cfg_trx_arfcn,
cfg_trx_arfcn_cmd,
- "arfcn <0-1024>",
+ "arfcn <0-1023>",
"Set the ARFCN for this TRX\n")
{
int arfcn = atoi(argv[0]);