aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/system_information.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2011-01-11 23:44:56 +0100
committerHarald Welte <laforge@gnumonks.org>2011-01-11 23:48:52 +0100
commit32c0962b100b5dd066b1a55e584baadd22fbe443 (patch)
treeac236f5c5d4119e59d16371cb338e6ed8ef33391 /openbsc/src/system_information.c
parent9b5f1d7b4399932ac83c0f1f14b192a25db8cf53 (diff)
[BSC] Allow manual override of neighbor cell list
So far, OpenBSC simply assumed that all BTS's configured in openbsc.cfg are neighbors of each other. While this is true for small site installations, it is definitely not true in most real world cases. We now have the following new commands at the 'configure bts' level: 'neighbor-list mode (auto|manual)' for selecting the mode 'neighbor-list (add|del) arfcn <0-1024>' for adding/deleting ARFCN in manual mode
Diffstat (limited to 'openbsc/src/system_information.c')
-rw-r--r--openbsc/src/system_information.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/openbsc/src/system_information.c b/openbsc/src/system_information.c
index 4f31c6b5d..5079d81b7 100644
--- a/openbsc/src/system_information.c
+++ b/openbsc/src/system_information.c
@@ -207,11 +207,14 @@ static int generate_bcch_chan_list(u_int8_t *chan_list, struct gsm_bts *bts)
/* Zero-initialize the bit-vector */
memset(bv->data, 0, bv->data_len);
- /* first we generate a bitvec of the BCCH ARFCN's in our BSC */
- llist_for_each_entry(cur_bts, &bts->network->bts_list, list) {
- if (cur_bts == bts)
- continue;
- bitvec_set_bit_pos(bv, cur_bts->c0->arfcn, 1);
+ /* Generate list of neighbor cells if we are in automatic mode */
+ if (bts->neigh_list_manual_mode == 0) {
+ /* first we generate a bitvec of the BCCH ARFCN's in our BSC */
+ llist_for_each_entry(cur_bts, &bts->network->bts_list, list) {
+ if (cur_bts == bts)
+ continue;
+ bitvec_set_bit_pos(bv, cur_bts->c0->arfcn, 1);
+ }
}
/* then we generate a GSM 04.08 frequency list from the bitvec */