aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libbsc/bsc_init.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2012-01-29 13:24:12 +0100
committerHarald Welte <laforge@gnumonks.org>2012-01-29 13:24:12 +0100
commit1fe73a19cda4e0bdbfc932ae69c7b59f84103f59 (patch)
treefcda3f653216ffcce9cd8c68185a95abad0ec0e0 /openbsc/src/libbsc/bsc_init.c
parent94b499c9bd72a5a4e6f64a147647bafb7e3bd5d8 (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
Diffstat (limited to 'openbsc/src/libbsc/bsc_init.c')
-rw-r--r--openbsc/src/libbsc/bsc_init.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/openbsc/src/libbsc/bsc_init.c b/openbsc/src/libbsc/bsc_init.c
index 529ffc040..441c0a9f0 100644
--- a/openbsc/src/libbsc/bsc_init.c
+++ b/openbsc/src/libbsc/bsc_init.c
@@ -210,7 +210,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++;
}
@@ -221,7 +221,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 */