aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libbsc/bsc_init.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@gnumonks.org>2011-08-17 22:44:07 +0200
committerHarald Welte <laforge@gnumonks.org>2011-08-19 22:38:35 +0200
commited5cacb240b846c106f0fc6a3ab8e8721f4c70a5 (patch)
treeba6bffbf0c95ecc0c50b5335bed77f3a2b29120f /openbsc/src/libbsc/bsc_init.c
parent7abecfcfc9ef94c1367cd88ac858b79d20f75db0 (diff)
src: port openBSC over libosmo-abisopenbsc/0.9.15
This is a big patch that ports openBSC over libosmo-abis. Sorry, the changes that are included here are all dependent of libosmo-abis, splitting them into smaller pieces would leave the repository in some intermediate state, which is not desired. The main changes are: - The directory libabis/ has been removed as it now lives in libosmo-abis. - new configuration file format for nanoBTS and HSL femto, we need to define the virtual e1_line and attach it to the OML link. - all the existing BTS drivers (nanoBTS, hsl femto, Nokia site, BS11 and rbs2000) now use the new libosmo-abis framework. - use r232 input driver available in libosmo-abis for bs11_config. - use ipa_msg_recv instead of old ipaccess_read_msg function. - delete definition of gsm_e1_subslot and input_signal_data. These structures now lives in libosmo-abis. Most of this patch are deletions of libabis/ which has been moved to libosmo-abis. This patch also modifies openBSC to use all the new definitions available in libosmocore and libosmo-abis. In order to do that, we have replaced the following: - DINP, DMI, DMIB and DMUX by their respective DL* correspondences. - SS_GLOBAL by SS_L_GLOBAL - SS_INPUT by SS_L_INPUT - S_GLOBAL_SHUTDOWN by S_L_GLOBAL_SHUTDOWN - SS_INPUT by SS_L_INPUT - S_INP_* by S_L_INP_* sub-signals - E1INP_NODE by L_E1INP_NODE vty node This patch has been tested with: - one nanoBTS - the HSL femto with the examples available under libosmo-abis - BS11 with both dahdi and misdn drivers.
Diffstat (limited to 'openbsc/src/libbsc/bsc_init.c')
-rw-r--r--openbsc/src/libbsc/bsc_init.c21
1 files changed, 7 insertions, 14 deletions
diff --git a/openbsc/src/libbsc/bsc_init.c b/openbsc/src/libbsc/bsc_init.c
index 1d885db37..84dfa6e80 100644
--- a/openbsc/src/libbsc/bsc_init.c
+++ b/openbsc/src/libbsc/bsc_init.c
@@ -82,7 +82,7 @@ int bsc_shutdown_net(struct gsm_network *net)
llist_for_each_entry(bts, &net->bts_list, list) {
LOGP(DNM, LOGL_NOTICE, "shutting down OML for BTS %u\n", bts->nr);
- osmo_signal_dispatch(SS_GLOBAL, S_GLOBAL_BTS_CLOSE_OM, bts);
+ osmo_signal_dispatch(SS_L_GLOBAL, S_GLOBAL_BTS_CLOSE_OM, bts);
}
return 0;
@@ -274,11 +274,11 @@ static int inp_sig_cb(unsigned int subsys, unsigned int signal,
struct gsm_bts_trx *trx = isd->trx;
int ts_no, lchan_no;
- if (subsys != SS_INPUT)
+ if (subsys != SS_L_INPUT)
return -EINVAL;
switch (signal) {
- case S_INP_TEI_UP:
+ case S_L_INP_TEI_UP:
if (isd->link_type == E1INP_SIGN_OML) {
/* TODO: this is required for the Nokia BTS, hopping is configured
during OML, other MA is not set. */
@@ -300,8 +300,8 @@ static int inp_sig_cb(unsigned int subsys, unsigned int signal,
if (isd->link_type == E1INP_SIGN_RSL)
bootstrap_rsl(trx);
break;
- case S_INP_TEI_DN:
- LOGP(DMI, LOGL_ERROR, "Lost some E1 TEI link: %d %p\n", isd->link_type, trx);
+ case S_L_INP_TEI_DN:
+ LOGP(DLMI, LOGL_ERROR, "Lost some E1 TEI link: %d %p\n", isd->link_type, trx);
if (isd->link_type == E1INP_SIGN_OML)
osmo_counter_inc(trx->bts->network->stats.bts.oml_fail);
@@ -469,7 +469,7 @@ int bsc_bootstrap_network(int (*mncc_recv)(struct gsm_network *, struct msgb *),
return rc;
osmo_signal_register_handler(SS_NM, nm_sig_cb, NULL);
- osmo_signal_register_handler(SS_INPUT, inp_sig_cb, NULL);
+ osmo_signal_register_handler(SS_L_INPUT, inp_sig_cb, NULL);
llist_for_each_entry(bts, &bsc_gsmnet->bts_list, list) {
rc = bootstrap_bts(bts);
@@ -477,14 +477,7 @@ int bsc_bootstrap_network(int (*mncc_recv)(struct gsm_network *, struct msgb *),
LOGP(DNM, LOGL_FATAL, "Error bootstrapping BTS\n");
return rc;
}
- switch (bts->type) {
- case GSM_BTS_TYPE_NANOBTS:
- case GSM_BTS_TYPE_HSL_FEMTO:
- break;
- default:
- rc = e1_reconfig_bts(bts);
- break;
- }
+ rc = e1_reconfig_bts(bts);
if (rc < 0) {
LOGP(DNM, LOGL_FATAL, "Error enabling E1 input driver\n");
return rc;