diff options
Diffstat (limited to 'src/osmo-bsc/nm_bb_transc_fsm.c')
-rw-r--r-- | src/osmo-bsc/nm_bb_transc_fsm.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/osmo-bsc/nm_bb_transc_fsm.c b/src/osmo-bsc/nm_bb_transc_fsm.c index c70904ba1..4b5e2b24d 100644 --- a/src/osmo-bsc/nm_bb_transc_fsm.c +++ b/src/osmo-bsc/nm_bb_transc_fsm.c @@ -111,13 +111,18 @@ static void configure_loop(struct gsm_bts_bb_trx *bb_transc, const struct gsm_nm /* Request TRX-level attributes */ if (!bb_transc->mo.get_attr_sent && !bb_transc->mo.get_attr_rep_received) { - bb_transc->mo.get_attr_sent = true; - /* N. B: we rely on attribute order when parsing response in abis_nm_rx_get_attr_resp() */ - const uint8_t trx_attr[] = { NM_ATT_MANUF_STATE, NM_ATT_SW_CONFIG, NM_ATT_IPACC_SUPP_FEATURES }; - /* we should not request more attributes than we're ready to handle */ - OSMO_ASSERT(sizeof(trx_attr) < MAX_BTS_ATTR); + uint8_t attr_buf[MAX_BTS_ATTR]; + uint8_t *ptr = &attr_buf[0]; + + *(ptr++) = NM_ATT_MANUF_STATE; + *(ptr++) = NM_ATT_SW_CONFIG; + if (is_ipa_abisip_bts(trx->bts)) + *(ptr++) = NM_ATT_IPACC_SUPP_FEATURES; + + OSMO_ASSERT((ptr - attr_buf) <= sizeof(attr_buf)); abis_nm_get_attr(trx->bts, NM_OC_BASEB_TRANSC, 0, trx->nr, 0xff, - trx_attr, sizeof(trx_attr)); + &attr_buf[0], (ptr - attr_buf)); + bb_transc->mo.get_attr_sent = true; } if (bb_transc->mo.get_attr_rep_received && |