aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/bsc_init.c
diff options
context:
space:
mode:
Diffstat (limited to 'openbsc/src/bsc_init.c')
-rw-r--r--openbsc/src/bsc_init.c30
1 files changed, 14 insertions, 16 deletions
diff --git a/openbsc/src/bsc_init.c b/openbsc/src/bsc_init.c
index 824820439..19449b3f5 100644
--- a/openbsc/src/bsc_init.c
+++ b/openbsc/src/bsc_init.c
@@ -20,8 +20,6 @@
*
*/
-#define GPRS
-
#include <openbsc/gsm_data.h>
#include <osmocore/gsm_utils.h>
#include <openbsc/gsm_04_08.h>
@@ -462,9 +460,10 @@ int nm_state_event(enum nm_evt evt, u_int8_t obj_class, void *obj,
abis_nm_opstart(trx->bts, obj_class, trx->bts->bts_nr,
trx->nr, 0xff);
break;
-#ifdef GPRS
case NM_OC_GPRS_NSE:
bts = container_of(obj, struct gsm_bts, gprs.nse);
+ if (!bts->gprs.enabled)
+ break;
if (new_state->availability == 5) {
abis_nm_ipaccess_set_attr(bts, obj_class, bts->bts_nr,
0xff, 0xff, nanobts_attr_nse,
@@ -477,6 +476,8 @@ int nm_state_event(enum nm_evt evt, u_int8_t obj_class, void *obj,
break;
case NM_OC_GPRS_CELL:
bts = container_of(obj, struct gsm_bts, gprs.cell);
+ if (!bts->gprs.enabled)
+ break;
if (new_state->availability == 5) {
abis_nm_ipaccess_set_attr(bts, obj_class, bts->bts_nr,
0, 0xff, nanobts_attr_cell,
@@ -490,6 +491,8 @@ int nm_state_event(enum nm_evt evt, u_int8_t obj_class, void *obj,
case NM_OC_GPRS_NSVC:
nsvc = obj;
bts = nsvc->bts;
+ if (!bts->gprs.enabled)
+ break;
/* We skip NSVC1 since we only use NSVC0 */
if (nsvc->id == 1)
break;
@@ -504,7 +507,6 @@ int nm_state_event(enum nm_evt evt, u_int8_t obj_class, void *obj,
nsvc->id, 0xff,
NM_STATE_UNLOCKED);
}
-#endif
default:
break;
}
@@ -797,14 +799,14 @@ static int set_system_infos(struct gsm_bts_trx *trx)
DEBUGP(DRR, "SI%2u: %s\n", i, hexdump(si_tmp, rc));
rsl_bcch_info(trx, i, si_tmp, sizeof(si_tmp));
}
-#ifdef GPRS
- i = 13;
- rc = gsm_generate_si(si_tmp, trx->bts, RSL_SYSTEM_INFO_13);
- if (rc < 0)
- goto err_out;
- DEBUGP(DRR, "SI%2u: %s\n", i, hexdump(si_tmp, rc));
- rsl_bcch_info(trx, RSL_SYSTEM_INFO_13, si_tmp, rc);
-#endif
+ if (bts->gprs.enabled) {
+ i = 13;
+ rc = gsm_generate_si(si_tmp, trx->bts, RSL_SYSTEM_INFO_13);
+ if (rc < 0)
+ goto err_out;
+ DEBUGP(DRR, "SI%2u: %s\n", i, hexdump(si_tmp, rc));
+ rsl_bcch_info(trx, RSL_SYSTEM_INFO_13, si_tmp, rc);
+ }
}
i = 5;
@@ -821,10 +823,6 @@ static int set_system_infos(struct gsm_bts_trx *trx)
DEBUGP(DRR, "SI%2u: %s\n", i, hexdump(si_tmp, rc));
rsl_sacch_filling(trx, RSL_SYSTEM_INFO_6, si_tmp, rc);
-#ifdef GPRS
- rsl_ipacc_pdch_activate(&trx->ts[7].lchan[0]);
-#endif
-
return 0;
err_out:
LOGP(DRR, LOGL_ERROR, "Cannot generate SI %u for BTS %u, most likely "