From c95cf10d0849f0795f69ef9b5b8db76e970272a6 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Thu, 22 Jul 2010 20:12:09 +0200 Subject: [ipaccess-config] fix bugs in generating the PHYSICAL CONFIG attribute ... while asking the BTS to perform tests for us. The length of the ARFCN whitelist is the actual length in bytes, not the number of 16bit ARFCN numbers. Also, implement a limit, either by rxlevel or by number of ARFCN that should end up in the whitelist. --- openbsc/src/ipaccess/ipaccess-config.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'openbsc/src/ipaccess/ipaccess-config.c') diff --git a/openbsc/src/ipaccess/ipaccess-config.c b/openbsc/src/ipaccess/ipaccess-config.c index 7b0fd40a1..f0ad464f9 100644 --- a/openbsc/src/ipaccess/ipaccess-config.c +++ b/openbsc/src/ipaccess/ipaccess-config.c @@ -127,10 +127,10 @@ static uint16_t build_physconf(uint8_t *physconf_buf, const struct rxlev_stats * /* Create whitelist from rxlevels */ physconf_buf[0] = phys_conf_min[0]; physconf_buf[1] = NM_IPAC_EIE_ARFCN_WHITE; - num_arfcn = ipac_rxlevstat2whitelist(whitelist, st); + num_arfcn = ipac_rxlevstat2whitelist(whitelist, st, 0, 100); arfcnlist_size = num_arfcn * 2; - *((uint16_t *) (physconf_buf+2)) = htons(num_arfcn); - printf("pc_buf (%s)\n", hexdump(physconf_buf, arfcnlist_size+4)); + *((uint16_t *) (physconf_buf+2)) = htons(arfcnlist_size); + DEBUGP(DNM, "physconf_buf (%s)\n", hexdump(physconf_buf, arfcnlist_size+4)); return arfcnlist_size+4; } -- cgit v1.2.3