laforge submitted this change.
abis_nm: send Get Attributes to GPRS Cell MO(s)
Change-Id: Ib6d87da49217f1c8d76445ce623a511a07daedbf
Related: OS#4505
---
M src/osmo-bsc/nm_gprs_cell_fsm.c
1 file changed, 41 insertions(+), 0 deletions(-)
diff --git a/src/osmo-bsc/nm_gprs_cell_fsm.c b/src/osmo-bsc/nm_gprs_cell_fsm.c
index 308e7e0..a0c0f1e 100644
--- a/src/osmo-bsc/nm_gprs_cell_fsm.c
+++ b/src/osmo-bsc/nm_gprs_cell_fsm.c
@@ -49,6 +49,8 @@
struct gsm_gprs_cell *cell = (struct gsm_gprs_cell *)fi->priv;
cell->mo.sw_act_rep_received = false;
+ cell->mo.get_attr_sent = false;
+ cell->mo.get_attr_rep_received = false;
cell->mo.set_attr_sent = false;
cell->mo.set_attr_ack_received = false;
cell->mo.adm_unlock_sent = false;
@@ -107,6 +109,23 @@
if (is_nanobts(bts) && !cell->mo.sw_act_rep_received)
return;
+ if (!cell->mo.get_attr_sent && !cell->mo.get_attr_rep_received) {
+ uint8_t attr_buf[2]; /* enlarge if needed */
+ uint8_t *ptr = &attr_buf[0];
+
+ *(ptr++) = NM_ATT_SW_CONFIG;
+ if (is_ipa_abisip_bts(bts))
+ *(ptr++) = NM_ATT_IPACC_SUPP_FEATURES;
+
+ OSMO_ASSERT((ptr - attr_buf) <= sizeof(attr_buf));
+ abis_nm_get_attr(bts, NM_OC_GPRS_CELL,
+ bts->bts_nr, 0x00, 0xff,
+ &attr_buf[0], (ptr - attr_buf));
+ cell->mo.get_attr_sent = true;
+ }
+
+ /* OS#6172: old osmo-bts versions do NACK Get Attributes for GPRS Cell,
+ * so we do not check if cell->mo.get_attr_rep_received is set here. */
if (!cell->mo.set_attr_sent && !cell->mo.set_attr_ack_received) {
cell->mo.set_attr_sent = true;
msgb = nanobts_gen_set_cell_attr(bts);
@@ -158,6 +177,11 @@
cell->mo.sw_act_rep_received = true;
configure_loop(cell, &cell->mo.nm_state, false);
break;
+ case NM_EV_GET_ATTR_REP:
+ cell->mo.get_attr_rep_received = true;
+ cell->mo.get_attr_sent = false;
+ configure_loop(cell, &cell->mo.nm_state, false);
+ return;
case NM_EV_SET_ATTR_ACK:
cell->mo.set_attr_ack_received = true;
cell->mo.set_attr_sent = false;
@@ -213,6 +237,11 @@
cell->mo.sw_act_rep_received = true;
configure_loop(cell, &cell->mo.nm_state, true);
break;
+ case NM_EV_GET_ATTR_REP:
+ cell->mo.get_attr_rep_received = true;
+ cell->mo.get_attr_sent = false;
+ configure_loop(cell, &cell->mo.nm_state, true);
+ return;
case NM_EV_SET_ATTR_ACK:
cell->mo.set_attr_ack_received = true;
cell->mo.set_attr_sent = false;
@@ -344,6 +373,7 @@
.in_event_mask =
X(NM_EV_SW_ACT_REP) |
X(NM_EV_STATE_CHG_REP) |
+ X(NM_EV_GET_ATTR_REP) |
X(NM_EV_SET_ATTR_ACK) |
X(NM_EV_SETUP_RAMP_READY),
.out_state_mask =
@@ -358,6 +388,7 @@
.in_event_mask =
X(NM_EV_SW_ACT_REP) |
X(NM_EV_STATE_CHG_REP) |
+ X(NM_EV_GET_ATTR_REP) |
X(NM_EV_SET_ATTR_ACK) |
X(NM_EV_SETUP_RAMP_READY),
.out_state_mask =
To view, visit change 34360. To unsubscribe, or for help writing mail filters, visit settings.