summaryrefslogtreecommitdiffstats
path: root/openbsc/src/libbsc/bsc_init.c
diff options
context:
space:
mode:
authorMax <msuraev@sysmocom.de>2017-05-29 11:48:29 +0200
committerHarald Welte <laforge@gnumonks.org>2017-06-09 08:58:04 +0000
commit33e1357a903dad41745df4b5b7284e80ce542ecb (patch)
treebbaece5605ec7ef498617232b7da0f2d7824ed1f /openbsc/src/libbsc/bsc_init.c
parent4a824ca8fcf13427d1560b2c866da2a2d82e3692 (diff)
Get TRX attributes
Request per-TRX attributes in addition to BTS attributes. Change-Id: I2b61131b9930afd03357c0b66947ee856d58cc46 Related: OS#1614
Diffstat (limited to 'openbsc/src/libbsc/bsc_init.c')
-rw-r--r--openbsc/src/libbsc/bsc_init.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/openbsc/src/libbsc/bsc_init.c b/openbsc/src/libbsc/bsc_init.c
index caec8005d..e5226a9c1 100644
--- a/openbsc/src/libbsc/bsc_init.c
+++ b/openbsc/src/libbsc/bsc_init.c
@@ -316,10 +316,13 @@ static int inp_sig_cb(unsigned int subsys, unsigned int signal,
struct input_signal_data *isd = signal_data;
struct gsm_bts_trx *trx = isd->trx;
int ts_no, lchan_no;
- const uint8_t attr[] = { NM_ATT_SW_CONFIG, };
+ /* N. B: we rely on attribute order when parsing response in abis_nm_rx_get_attr_resp() */
+ const uint8_t bts_attr[] = { NM_ATT_MANUF_ID, NM_ATT_SW_CONFIG, };
+ const uint8_t trx_attr[] = { NM_ATT_MANUF_STATE, NM_ATT_SW_CONFIG, };
/* we should not request more attributes than we're ready to handle */
- OSMO_ASSERT(sizeof(attr) < MAX_BTS_ATTR);
+ OSMO_ASSERT(sizeof(bts_attr) < MAX_BTS_ATTR);
+ OSMO_ASSERT(sizeof(trx_attr) < MAX_BTS_ATTR);
if (subsys != SS_L_INPUT)
return -EINVAL;
@@ -339,14 +342,17 @@ static int inp_sig_cb(unsigned int subsys, unsigned int signal,
set bts->si_common.cell_alloc */
generate_cell_chan_list(ca, trx->bts);
+ /* Request generic BTS-level attributes */
+ abis_nm_get_attr(trx->bts, NM_OC_BTS, trx->bts->nr, trx->nr, 0xFF, bts_attr, sizeof(bts_attr));
+
llist_for_each_entry(cur_trx, &trx->bts->trx_list, list) {
int i;
-
+ /* Request TRX-level attributes */
+ abis_nm_get_attr(cur_trx->bts, NM_OC_BASEB_TRANSC, cur_trx->bts->nr, cur_trx->nr, 0xFF,
+ trx_attr, sizeof(trx_attr));
for (i = 0; i < ARRAY_SIZE(cur_trx->ts); i++)
generate_ma_for_ts(&cur_trx->ts[i]);
}
-
- abis_nm_get_attr(trx->bts, NM_OC_BTS, trx->bts->nr, trx->nr, 0xFF, attr, sizeof(attr));
}
if (isd->link_type == E1INP_SIGN_RSL)
bootstrap_rsl(trx);