[BSC] Move the BTS-type specific code from bcs_init.c to bts_*.c
bsc_init.c was a big mess even only for two supported BTS models,
so before adding more BTS types, this needs a cleanup.
All the BTS specific code from bsc_init.c has now moved into
bts_{siemens_bs11,ipaccess_nanobts}.c
This has required that input_event() and nm_state_event() get both
converted to proper libosmocore signals instead of referencing external
symbols.
diff --git a/openbsc/include/openbsc/abis_nm.h b/openbsc/include/openbsc/abis_nm.h
index 4d1623d..c93db58 100644
--- a/openbsc/include/openbsc/abis_nm.h
+++ b/openbsc/include/openbsc/abis_nm.h
@@ -160,14 +160,6 @@
const char *ipacc_testres_name(u_int8_t res);
/* Functions calling into other code parts */
-enum nm_evt {
- EVT_STATECHG_OPER,
- EVT_STATECHG_ADM,
-};
-int nm_state_event(enum nm_evt evt, u_int8_t obj_class, void *obj,
- struct gsm_nm_state *old_state, struct gsm_nm_state *new_state,
- struct abis_om_obj_inst *obj_inst);
-
const char *nm_opstate_name(u_int8_t os);
const char *nm_avail_name(u_int8_t avail);
int nm_is_running(struct gsm_nm_state *s);
diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h
index 792f56f..e8433fd 100644
--- a/openbsc/include/openbsc/gsm_data.h
+++ b/openbsc/include/openbsc/gsm_data.h
@@ -787,12 +787,6 @@
char *gsm_lchan_name(struct gsm_lchan *lchan);
const char *gsm_lchans_name(enum gsm_lchan_state s);
-enum gsm_e1_event {
- EVT_E1_NONE,
- EVT_E1_TEI_UP,
- EVT_E1_TEI_DN,
-};
-
void set_ts_e1link(struct gsm_bts_trx_ts *ts, u_int8_t e1_nr,
u_int8_t e1_ts, u_int8_t e1_ts_ss);
enum gsm_bts_type parse_btstype(const char *arg);
diff --git a/openbsc/include/openbsc/signal.h b/openbsc/include/openbsc/signal.h
index 8baada3..c583e94 100644
--- a/openbsc/include/openbsc/signal.h
+++ b/openbsc/include/openbsc/signal.h
@@ -47,6 +47,7 @@
SS_RF,
SS_MSC,
SS_HO,
+ SS_INPUT,
};
/* SS_PAGING signals */
@@ -81,6 +82,8 @@
S_NM_IPACC_RESTART_ACK, /* nanoBTS has send a restart ack */
S_NM_IPACC_RESTART_NACK,/* nanoBTS has send a restart ack */
S_NM_TEST_REP, /* GSM 12.21 Test Report */
+ S_NM_STATECHG_OPER, /* Operational State changed*/
+ S_NM_STATECHG_ADM, /* Administrative State changed */
};
/* SS_LCHAN signals */
@@ -126,6 +129,7 @@
enum signal_global {
S_GLOBAL_SHUTDOWN,
+ S_GLOBAL_BTS_CLOSE_OM,
};
/* SS_RF signals */
@@ -135,6 +139,13 @@
S_RF_GRACE,
};
+/* SS_INPUT signals */
+enum signal_input {
+ S_INP_NONE,
+ S_INP_TEI_UP,
+ S_INP_TEI_DN,
+};
+
struct gsm_subscriber;
struct paging_signal_data {
@@ -158,6 +169,14 @@
u_int8_t msg_type;
};
+struct nm_statechg_signal_data {
+ u_int8_t obj_class;
+ void *obj;
+ struct gsm_nm_state *old_state;
+ struct gsm_nm_state *new_state;
+ struct abis_om_obj_inst *obj_inst;
+};
+
struct nm_nack_signal_data {
struct msgb *msg;
uint8_t mt;
@@ -222,5 +241,9 @@
struct gsm_lchan *new_lchan;
};
+struct input_signal_data {
+ int link_type;
+ struct gsm_bts_trx *trx;
+};
#endif