gsm_data: Update trx_is_usable for ericsson BTS

There is no bb_transc oject.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Change-Id: I34bb808cd21575ff25d36e6df028b140935a008f
This commit is contained in:
Sylvain Munaut 2020-05-08 09:58:26 +02:00 committed by laforge
parent 5438554315
commit 57a1ec5b2e
2 changed files with 16 additions and 0 deletions

View File

@ -1719,6 +1719,18 @@ static inline int is_nokia_bts(struct gsm_bts *bts)
return 0;
}
static inline int is_ericsson_bts(struct gsm_bts *bts)
{
switch (bts->type) {
case GSM_BTS_TYPE_RBS2000:
return 1;
default:
break;
}
return 0;
}
static inline int is_e1_bts(struct gsm_bts *bts)
{
switch (bts->type) {

View File

@ -1399,6 +1399,10 @@ bool trx_is_usable(const struct gsm_bts_trx *trx)
if (!nm_is_running(&trx->mo.nm_state) ||
!nm_is_running(&trx->bb_transc.mo.nm_state))
return false;
} else if (is_ericsson_bts(trx->bts)) {
/* The OM2000 -> 12.21 mapping we do doesn't have separate bb_transc MO */
if (!nm_is_running(&trx->mo.nm_state))
return false;
}
return true;