diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2020-10-02 17:06:45 +0200 |
---|---|---|
committer | laforge <laforge@osmocom.org> | 2020-10-20 13:45:57 +0000 |
commit | 88fe4b079d1b10c0cfd35c49cad1484bc91be308 (patch) | |
tree | 1aa5aa15bb5083ff30aa915bca3c0db7d853eb4b /include/osmo-bts/bts.h | |
parent | 6d117891c93da969e0ff8b293bef97c699490f2b (diff) |
Introduce NM BTS Site Manager FSM
This fixes old behavior mimicing broken behavior in nanoBTS (according to TS 12.21)
where BTS Site Mgr NM object was announced as Enabled despite no OPSTART
was sent by the BSC.
With this new FSM, BTS SiteManager will be announced as Disabled Offline
during OML startup conversation, instead of Enabled.
The new osmo-bsc OML management FSMs use this change in behavior to find
out whether it should use the old broken management states (without
Offline state, as per nanoBTS) or use the new state transitions (which
allow fixing several race conditions).
Change-Id: Iab2d17c45c9642860cd2d5d523c1baae24502243
Diffstat (limited to 'include/osmo-bts/bts.h')
-rw-r--r-- | include/osmo-bts/bts.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/include/osmo-bts/bts.h b/include/osmo-bts/bts.h index a2eecc47..ce7d9d47 100644 --- a/include/osmo-bts/bts.h +++ b/include/osmo-bts/bts.h @@ -101,6 +101,11 @@ enum ms_ul_pf_algo { MS_UL_PF_ALGO_EWMA, }; +/* BTS Site Manager */ +struct gsm_bts_sm { + struct gsm_abis_mo mo; +}; + /* One BTS */ struct gsm_bts { /* list header in net->bts_list */ @@ -150,9 +155,7 @@ struct gsm_bts { /* CCCH is on C0 */ struct gsm_bts_trx *c0; - struct { - struct gsm_abis_mo mo; - } site_mgr; + struct gsm_bts_sm site_mgr; /* bitmask of all SI that are present/valid in si_buf */ uint32_t si_valid; @@ -345,6 +348,10 @@ extern void *tall_bts_ctx; #define GSM_BTS_HAS_SI(bts, i) ((bts)->si_valid & (1 << i)) #define GSM_BTS_SI(bts, i) (void *)((bts)->si_buf[i][0]) +static inline struct gsm_bts *gsm_bts_sm_get_bts(struct gsm_bts_sm *site_mgr) { + return (struct gsm_bts *)container_of(site_mgr, struct gsm_bts, site_mgr); +} + struct gsm_bts *gsm_bts_alloc(void *talloc_ctx, uint8_t bts_num); struct gsm_bts *gsm_bts_num(const struct gsm_network *net, int num); |