aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include/openbsc
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2016-07-09 22:20:57 +0200
committerHarald Welte <laforge@gnumonks.org>2016-11-08 19:57:50 +0000
commit591e1d7daa6839c9a02714b7420206ca4542aafe (patch)
tree56667a9132ad14676cf75f89095e0fce633900b9 /openbsc/include/openbsc
parentb748012d3186209c0f4c38ebb7113ce7c60e333b (diff)
WIP: OM2000: Full state machine implementation using osmo_fsm
Our existing OM2000 code for initializing all Managed Objects of a BTS at startup was never complete. Rather than trying to fix the old-style code, introudce a hierarchy of osmo_fsm's reflecting the full protocol hand-shake and sequence of bringing up the individual MO's. If this works out well, it mihgt make sense to convert the TS 12.21 OML code for other BTS models, too. Change-Id: I3e11b28ba22b8c227e0401e6207fdda5381dda8c
Diffstat (limited to 'openbsc/include/openbsc')
-rw-r--r--openbsc/include/openbsc/abis_om2000.h11
-rw-r--r--openbsc/include/openbsc/gsm_data_shared.h39
2 files changed, 43 insertions, 7 deletions
diff --git a/openbsc/include/openbsc/abis_om2000.h b/openbsc/include/openbsc/abis_om2000.h
index 2ff72705b..5a7344f40 100644
--- a/openbsc/include/openbsc/abis_om2000.h
+++ b/openbsc/include/openbsc/abis_om2000.h
@@ -41,13 +41,6 @@ enum om2k_mo_state {
OM2K_MO_S_DISABLED,
};
-struct abis_om2k_mo {
- uint8_t class;
- uint8_t bts;
- uint8_t assoc_so;
- uint8_t inst;
-} __attribute__ ((packed));
-
/* on-wire format for IS conn group */
struct om2k_is_conn_grp {
uint16_t icp1;
@@ -90,6 +83,10 @@ int abis_om2k_tx_rx_conf_req(struct gsm_bts_trx *trx);
int abis_om2k_tx_tx_conf_req(struct gsm_bts_trx *trx);
int abis_om2k_tx_ts_conf_req(struct gsm_bts_trx_ts *ts);
+struct osmo_fsm_inst *om2k_bts_fsm_start(struct gsm_bts *bts);
+void abis_om2k_bts_init(struct gsm_bts *bts);
+void abis_om2k_trx_init(struct gsm_bts_trx *trx);
+
int abis_om2k_vty_init(void);
struct vty;
diff --git a/openbsc/include/openbsc/gsm_data_shared.h b/openbsc/include/openbsc/gsm_data_shared.h
index 4472310e3..97fde835f 100644
--- a/openbsc/include/openbsc/gsm_data_shared.h
+++ b/openbsc/include/openbsc/gsm_data_shared.h
@@ -104,6 +104,19 @@ struct gsm_abis_mo {
struct gsm_bts *bts;
};
+/* Ericsson OM2000 Managed Object */
+struct abis_om2k_mo {
+ uint8_t class;
+ uint8_t bts;
+ uint8_t assoc_so;
+ uint8_t inst;
+} __attribute__ ((packed));
+
+struct om2k_mo {
+ struct abis_om2k_mo addr;
+ struct osmo_fsm_inst *fsm;
+};
+
#define MAX_A5_KEY_LEN (128/8)
#define A38_XOR_MIN_KEY_LEN 12
#define A38_XOR_MAX_KEY_LEN 16
@@ -387,6 +400,12 @@ struct gsm_bts_trx_ts {
/* To which E1 subslot are we connected */
struct gsm_e1_subslot e1_link;
+ union {
+ struct {
+ struct om2k_mo om2k_mo;
+ } rbs2000;
+ };
+
struct gsm_lchan lchan[TS_MAX_LCHAN];
};
@@ -441,6 +460,17 @@ struct gsm_bts_trx {
uint8_t test_nr;
struct rxlev_stats rxlev_stat;
} ipaccess;
+ struct {
+ struct {
+ struct om2k_mo om2k_mo;
+ } trxc;
+ struct {
+ struct om2k_mo om2k_mo;
+ } rx;
+ struct {
+ struct om2k_mo om2k_mo;
+ } tx;
+ } rbs2000;
};
struct gsm_bts_trx_ts ts[TRX_NR_TS];
};
@@ -679,17 +709,26 @@ struct gsm_bts {
} bs11;
struct {
struct {
+ struct om2k_mo om2k_mo;
+ struct gsm_abis_mo mo;
+ struct llist_head conn_groups;
+ } cf;
+ struct {
+ struct om2k_mo om2k_mo;
struct gsm_abis_mo mo;
struct llist_head conn_groups;
} is;
struct {
+ struct om2k_mo om2k_mo;
struct gsm_abis_mo mo;
struct llist_head conn_groups;
} con;
struct {
+ struct om2k_mo om2k_mo;
struct gsm_abis_mo mo;
} dp;
struct {
+ struct om2k_mo om2k_mo;
struct gsm_abis_mo mo;
} tf;
} rbs2000;