fixeria has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/34360?usp=email )


Change subject: abis_nm: send Get Attributes to GPRS Cell MO(s)
......................................................................

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, 40 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/60/34360/1

diff --git a/src/osmo-bsc/nm_gprs_cell_fsm.c b/src/osmo-bsc/nm_gprs_cell_fsm.c
index 2f139a6..702e852 100644
--- a/src/osmo-bsc/nm_gprs_cell_fsm.c
+++ b/src/osmo-bsc/nm_gprs_cell_fsm.c
@@ -48,6 +48,8 @@
 {
        struct gsm_gprs_cell *cell = (struct gsm_gprs_cell *)fi->priv;

+       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;
@@ -98,6 +100,22 @@
        if (bts_setup_ramp_wait(bts))
                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, 0, bts->nr, 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);
@@ -145,6 +163,11 @@
        const struct gsm_nm_state *new_state;

        switch (event) {
+       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;
@@ -196,6 +219,11 @@
        const struct gsm_nm_state *new_state;

        switch (event) {
+       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;
@@ -326,6 +354,7 @@
        [NM_GPRS_CELL_ST_OP_DISABLED_DEPENDENCY] = {
                .in_event_mask =
                        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 =
@@ -339,6 +368,7 @@
        [NM_GPRS_CELL_ST_OP_DISABLED_OFFLINE] = {
                .in_event_mask =
                        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 https://gerrit.osmocom.org/c/osmo-bsc/+/34360?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Ib6d87da49217f1c8d76445ce623a511a07daedbf
Gerrit-Change-Number: 34360
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanits...@sysmocom.de>
Gerrit-MessageType: newchange

Reply via email to