aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Sperling <ssperling@sysmocom.de>2018-05-07 16:44:39 +0200
committerStefan Sperling <ssperling@sysmocom.de>2018-05-07 16:44:39 +0200
commit8799619d27f499481f1bd4f008a7cecc463dc370 (patch)
tree07abd8ddffde2422bacc78045eb3f0ea31933d8e
parent6bdbf6727335a91c6ed7b680259c8db1e3529063 (diff)
send a State Changed Event Report when rf is locked/unlocked
Make osmo-bts send a State Changed Event Report when RF is locked or unlocked. This behaviour isn't mentioned in the spec as far as we know, but an ipaccess nanobts also produces these messages. Change-Id: I37e44ef4881c41f8835428b610e7863f37397c9f Related: OS#3161
-rw-r--r--src/common/oml.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/common/oml.c b/src/common/oml.c
index a1e7fdaa..89db9cf5 100644
--- a/src/common/oml.c
+++ b/src/common/oml.c
@@ -322,6 +322,9 @@ int oml_tx_state_changed(struct gsm_abis_mo *mo)
/* 9.4.7 Availability Status */
msgb_tl16v_put(nmsg, NM_ATT_AVAIL_STATUS, 1, &mo->nm_state.availability);
+ /* 9.4.4 Administrative Status -- not in spec but also sent by nanobts */
+ msgb_tv_put(nmsg, NM_ATT_ADM_STATE, mo->nm_state.administrative);
+
return oml_mo_send_msg(mo, nmsg, NM_MT_STATECHG_EVENT_REP);
}
@@ -383,6 +386,7 @@ int oml_mo_fom_ack_nack(struct gsm_abis_mo *mo, uint8_t orig_msg_type,
int oml_mo_statechg_ack(struct gsm_abis_mo *mo)
{
struct msgb *msg;
+ int rc = 0;
msg = oml_msgb_alloc();
if (!msg)
@@ -390,7 +394,12 @@ int oml_mo_statechg_ack(struct gsm_abis_mo *mo)
msgb_tv_put(msg, NM_ATT_ADM_STATE, mo->nm_state.administrative);
- return oml_mo_send_msg(mo, msg, NM_MT_CHG_ADM_STATE_ACK);
+ rc = oml_mo_send_msg(mo, msg, NM_MT_CHG_ADM_STATE_ACK);
+ if (rc != 0)
+ return rc;
+
+ /* Emulate behaviour of ipaccess nanobts: Send a 'State Changed Event Report' as well. */
+ return oml_tx_state_changed(mo);
}
int oml_mo_statechg_nack(struct gsm_abis_mo *mo, uint8_t nack_cause)