Check OML state per-BTS
To properly decide if a given OML link is degraded we have to use BTS-specific information about MO state. * move check function into BTS-specific part * add generic wrapper Related: OS#2486 Change-Id: Iddc7a4d20fbb95a6566eed1487a12733e5adb9e2
This commit is contained in:
parent
848e1a566f
commit
36bf7974ab
|
@ -162,6 +162,7 @@ int ipac_parse_bcch_info(struct ipac_bcch_info *binf, uint8_t *buf);
|
|||
const char *ipacc_testres_name(uint8_t res);
|
||||
|
||||
/* Functions calling into other code parts */
|
||||
bool all_trx_rsl_connected(const struct gsm_bts *bts);
|
||||
int nm_is_running(struct gsm_nm_state *s);
|
||||
|
||||
int abis_nm_vty_init(void);
|
||||
|
|
|
@ -654,7 +654,6 @@ extern struct e1inp_line_ops bts_isdn_e1inp_line_ops;
|
|||
extern const struct value_string bts_type_names[_NUM_GSM_BTS_TYPE+1];
|
||||
extern const struct value_string bts_type_descs[_NUM_GSM_BTS_TYPE+1];
|
||||
|
||||
char *get_oml_status(const struct gsm_bts *bts);
|
||||
char *get_model_oml_status(const struct gsm_bts *bts);
|
||||
|
||||
unsigned long long bts_uptime(const struct gsm_bts *bts);
|
||||
|
|
|
@ -683,7 +683,7 @@ static int abis_nm_rx_lmt_event(struct msgb *mb)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static inline bool all_trx_rsl_connected(const struct gsm_bts *bts)
|
||||
bool all_trx_rsl_connected(const struct gsm_bts *bts)
|
||||
{
|
||||
const struct gsm_bts_trx *trx;
|
||||
|
||||
|
@ -695,14 +695,6 @@ static inline bool all_trx_rsl_connected(const struct gsm_bts *bts)
|
|||
return true;
|
||||
}
|
||||
|
||||
char *get_oml_status(const struct gsm_bts *bts)
|
||||
{
|
||||
if (bts->oml_link)
|
||||
return all_trx_rsl_connected(bts) ? "connected" : "degraded";
|
||||
|
||||
return "disconnected";
|
||||
}
|
||||
|
||||
char *get_model_oml_status(const struct gsm_bts *bts)
|
||||
{
|
||||
if (bts->model->oml_status)
|
||||
|
|
|
@ -47,6 +47,14 @@ extern struct gsm_network *bsc_gsmnet;
|
|||
static int bts_model_nanobts_start(struct gsm_network *net);
|
||||
static void bts_model_nanobts_e1line_bind_ops(struct e1inp_line *line);
|
||||
|
||||
static char *get_oml_status(const struct gsm_bts *bts)
|
||||
{
|
||||
if (bts->oml_link)
|
||||
return all_trx_rsl_connected(bts) ? "connected" : "degraded";
|
||||
|
||||
return "disconnected";
|
||||
}
|
||||
|
||||
struct gsm_bts_model bts_model_nanobts = {
|
||||
.type = GSM_BTS_TYPE_NANOBTS,
|
||||
.name = "nanobts",
|
||||
|
|
Loading…
Reference in New Issue