aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bsc/bts_ipaccess_nanobts.c
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2020-12-03 19:52:22 +0100
committerPau Espin Pedrol <pespin@espeweb.net>2020-12-04 14:44:43 +0100
commit10364c899921679931ef5f6c287624a736b64d15 (patch)
treef2963a39f36895af67fbc4f70e8e268759c75e9d /src/osmo-bsc/bts_ipaccess_nanobts.c
parentdd6af77e44a85702023f7faa7e361c800672a105 (diff)
Handle BTS/BBTRANSC Get Attributes (Ack) in NM FSMs
Before this patch, Get Attributes was sent quicklyafter the OML link became up, even if the BTS/BB_TRANSC objects were still powered off, which is wrong since attributes should only be available after the objects transition out of the Power off state. Furthermore, information about get attr response already received will be required in future patches to delay NSVC setting. Related: OS#4870 Change-Id: I8ec39c7e1f956ffce9aecd58a5590c43200ba086
Diffstat (limited to 'src/osmo-bsc/bts_ipaccess_nanobts.c')
-rw-r--r--src/osmo-bsc/bts_ipaccess_nanobts.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/osmo-bsc/bts_ipaccess_nanobts.c b/src/osmo-bsc/bts_ipaccess_nanobts.c
index 6d8f91fbf..c84d75084 100644
--- a/src/osmo-bsc/bts_ipaccess_nanobts.c
+++ b/src/osmo-bsc/bts_ipaccess_nanobts.c
@@ -339,6 +339,27 @@ static void nm_rx_opstart_nack(struct msgb *oml_msg)
}
}
+static void nm_rx_get_attr_rep(struct msgb *oml_msg)
+{
+ struct abis_om_fom_hdr *foh = msgb_l3(oml_msg);
+ struct e1inp_sign_link *sign_link = oml_msg->dst;
+ struct gsm_bts *bts = sign_link->trx->bts;
+ struct gsm_bts_trx *trx;
+
+ switch (foh->obj_class) {
+ case NM_OC_BTS:
+ osmo_fsm_inst_dispatch(bts->mo.fi, NM_EV_GET_ATTR_REP, NULL);
+ break;
+ case NM_OC_BASEB_TRANSC:
+ if (!(trx = gsm_bts_trx_num(bts, foh->obj_inst.trx_nr)))
+ return;
+ osmo_fsm_inst_dispatch(trx->bb_transc.mo.fi, NM_EV_GET_ATTR_REP, NULL);
+ break;
+ default:
+ LOGPFOH(DNM, LOGL_ERROR, foh, "Get Attributes Response received on incorrect object class %d!\n", foh->obj_class);
+ }
+}
+
static void nm_rx_set_bts_attr_ack(struct msgb *oml_msg)
{
struct abis_om_fom_hdr *foh = msgb_l3(oml_msg);
@@ -432,6 +453,9 @@ static int bts_ipa_nm_sig_cb(unsigned int subsys, unsigned int signal,
case S_NM_OPSTART_NACK:
nm_rx_opstart_nack(signal_data);
return 0;
+ case S_NM_GET_ATTR_REP:
+ nm_rx_get_attr_rep(signal_data);
+ return 0;
case S_NM_SET_BTS_ATTR_ACK:
nm_rx_set_bts_attr_ack(signal_data);
return 0;