mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw.git
synced 2025-10-23 08:12:01 +00:00
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
This commit is contained in:
@@ -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 */
|
||||
|
@@ -2240,7 +2240,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")
|
||||
@@ -2264,7 +2264,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")
|
||||
@@ -2322,7 +2322,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]);
|
||||
|
Reference in New Issue
Block a user