aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/bsc_init.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-04-20 18:02:25 +0800
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-04-20 18:02:25 +0800
commit4417f7f477dc5ab503dae5ab6ad2a85ab0567243 (patch)
tree376e33ab99b485e0c4927b478ab6c0c0978a0ce6 /openbsc/src/bsc_init.c
parent39563af27c110b73b057f667daa9559387d4aad5 (diff)
[vty] Allow to set the RACH NM attributes on a per BTS basis
Be able to tune the RACH settings of the BTS via the vty interface, by default they are initialized to -1 which means we will use the content of the static array (BTS default) and can be changed via the VTY interface. I have verified the setting on the nanoBTS with wireshark and I have tested writing the config file.
Diffstat (limited to 'openbsc/src/bsc_init.c')
-rw-r--r--openbsc/src/bsc_init.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/openbsc/src/bsc_init.c b/openbsc/src/bsc_init.c
index 44c4d319a..1a969187c 100644
--- a/openbsc/src/bsc_init.c
+++ b/openbsc/src/bsc_init.c
@@ -855,6 +855,22 @@ static void patch_nm_tables(struct gsm_bts *bts)
bs11_attr_radio[2] |= arfcn_high;
bs11_attr_radio[3] = arfcn_low;
+ /* patch the RACH attributes */
+ if (bts->rach_b_thresh != -1) {
+ nanobts_attr_bts[33] = bts->rach_b_thresh & 0xff;
+ bs11_attr_bts[33] = bts->rach_b_thresh & 0xff;
+ }
+
+ if (bts->rach_ldavg_slots != -1) {
+ u_int8_t avg_high = bts->rach_ldavg_slots & 0xff;
+ u_int8_t avg_low = (bts->rach_ldavg_slots >> 8) & 0x0f;
+
+ nanobts_attr_bts[35] = avg_high;
+ nanobts_attr_bts[36] = avg_low;
+ bs11_attr_bts[35] = avg_high;
+ bs11_attr_bts[36] = avg_low;
+ }
+
/* patch BSIC */
bs11_attr_bts[1] = bts->bsic;
nanobts_attr_bts[sizeof(nanobts_attr_bts)-11] = bts->bsic;