aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/system_information.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2011-02-15 11:43:27 +0100
committerHarald Welte <laforge@gnumonks.org>2011-02-15 11:43:27 +0100
commit64c07d213c7bf09813a16a7aad8bacacfdc3011a (patch)
treebbe9ca631fd33046bb336391582ce9c1c3a589c4 /openbsc/src/system_information.c
parentb01bf33ad4a9ab21b6f0d6e88e1e28c38c23cdf7 (diff)
Allow configuration of SI5 neighbor list != SI2 neighbor list
This introducecs the new VTY command "neighbor-list mode manual-si5" in combination with "si5 neighbor-list (add|del) arfcn <0-1024>", which allows you to (optionally) have neighbor channel lists that differ in SI5 and in SI2.
Diffstat (limited to 'openbsc/src/system_information.c')
-rw-r--r--openbsc/src/system_information.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/openbsc/src/system_information.c b/openbsc/src/system_information.c
index 5079d81b7..1dc1bb0ea 100644
--- a/openbsc/src/system_information.c
+++ b/openbsc/src/system_information.c
@@ -199,16 +199,21 @@ static int generate_cell_chan_list(u_int8_t *chan_list, struct gsm_bts *bts)
}
/* generate a cell channel list as per Section 10.5.2.1b of 04.08 */
-static int generate_bcch_chan_list(u_int8_t *chan_list, struct gsm_bts *bts)
+static int generate_bcch_chan_list(u_int8_t *chan_list, struct gsm_bts *bts, int si5)
{
struct gsm_bts *cur_bts;
- struct bitvec *bv = &bts->si_common.neigh_list;
+ struct bitvec *bv;
+
+ if (si5 && bts->neigh_list_manual_mode == NL_MODE_MANUAL_SI5SEP)
+ bv = &bts->si_common.si5_neigh_list;
+ else
+ bv = &bts->si_common.neigh_list;
/* Zero-initialize the bit-vector */
memset(bv->data, 0, bv->data_len);
/* Generate list of neighbor cells if we are in automatic mode */
- if (bts->neigh_list_manual_mode == 0) {
+ if (bts->neigh_list_manual_mode == NL_MODE_AUTOMATIC) {
/* 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)
@@ -259,7 +264,7 @@ static int generate_si2(u_int8_t *output, struct gsm_bts *bts)
si2->header.skip_indicator = 0;
si2->header.system_information = GSM48_MT_RR_SYSINFO_2;
- rc = generate_bcch_chan_list(si2->bcch_frequency_list, bts);
+ rc = generate_bcch_chan_list(si2->bcch_frequency_list, bts, 0);
if (rc < 0)
return rc;
@@ -376,7 +381,7 @@ static int generate_si5(u_int8_t *output, struct gsm_bts *bts)
si5->rr_protocol_discriminator = GSM48_PDISC_RR;
si5->skip_indicator = 0;
si5->system_information = GSM48_MT_RR_SYSINFO_5;
- rc = generate_bcch_chan_list(si5->bcch_frequency_list, bts);
+ rc = generate_bcch_chan_list(si5->bcch_frequency_list, bts, 1);
if (rc < 0)
return rc;