aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2023-09-21 02:42:25 +0700
committerVadim Yanitskiy <vyanitskiy@sysmocom.de>2023-09-23 17:04:41 +0700
commit392cfc6a2ac3a193e54272940aafb0fbbc5b2114 (patch)
tree9c90b5ab7036d97feb5c6ad82b34831d6208dee0 /include
parenta1745e3bdde1c5db0a8650d9cf5003c9c0da057f (diff)
abis_nm: delay configure_loop() until NM_MT_SW_ACTIVATED_REP
Even though the Abis/OML message flow looks the way it should look on the wire, it does not actually reflect the sequence/flow of events and actions in the NM FSMs. For example (extracted from a PCAP): GPRS Cell(00,00,ff) State Changed Event Report GPRS Cell(00,00,ff) Software Activate Request GPRS Cell(00,00,ff) Software Activate Request ACK GPRS Cell(00,00,ff) Activate Software GPRS Cell(00,00,ff) Activate Software ACK [a] GPRS Cell(00,00,ff) State Changed Event Report [b] GPRS Cell(00,00,ff) Software Activated Report [c] GPRS Cell(00,00,ff) Get Attributes GPRS Cell(00,00,ff) Get Attributes Response [d] GPRS Cell(00,00,ff) IPA Set Attributes GPRS Cell(00,00,ff) IPA Set Attributes ACK GPRS Cell(00,00,ff) Change Administrative State GPRS Cell(00,00,ff) Change Administrative State ACK GPRS Cell(00,00,ff) State Changed Event Report GPRS Cell(00,00,ff) Opstart GPRS Cell(00,00,ff) Opstart ACK A follow-up patch [1] changes the logic generating message [d], so that the IPA Object Version of the GPRS Cell MO is taken into account when adding the attributes. The problem is that both messages [c] and [d] are generated and queued for transmission on the receipt of message [a], but *before* message [b] has been processed. So the IPA Object Version is not known and assumed to be 0 at that point in time. This patch delays configure_loop() until message [b] is received. So far only for nanoBTS and only for those MOs, for which Figure 2 in 3GPP TS 52.021 explicitly mentions that the SW downloading and activation procedures may be required, plus for the ip.access specific MOs which all seem to support the SW activation. osmo-bts does send SW Activated Report only for a subset of MOs, which does not include Baseband Transceiver, Radio Carrier, and Radio Channel. 3GPP TS 52.021 is not clear on whether this message shall be sent by all MOs either, so we consider it optional and delay configure_loop() only for nanoBTS. Change-Id: I3953a5e41eb27165f9ff203cac7447ee9d311abf Related: [1] Ie0fb3eaf76e1f70e5a19bb088e1674b7e553d32a
Diffstat (limited to 'include')
-rw-r--r--include/osmocom/bsc/bts.h11
-rw-r--r--include/osmocom/bsc/gsm_data.h1
2 files changed, 12 insertions, 0 deletions
diff --git a/include/osmocom/bsc/bts.h b/include/osmocom/bsc/bts.h
index 3f7958c57..6974dcad2 100644
--- a/include/osmocom/bsc/bts.h
+++ b/include/osmocom/bsc/bts.h
@@ -692,6 +692,17 @@ static inline bool is_ipa_abisip_bts(const struct gsm_bts *bts)
return false;
}
+static inline bool is_nanobts(const struct gsm_bts *bts)
+{
+ switch (bts->type) {
+ case GSM_BTS_TYPE_NANOBTS:
+ return true;
+ default:
+ break;
+ }
+ return false;
+}
+
static inline bool is_osmobts(const struct gsm_bts *bts)
{
switch (bts->type) {
diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index 2876d249c..275e4f104 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -528,6 +528,7 @@ struct gsm_abis_mo {
struct gsm_nm_state nm_state;
struct gsm_bts *bts;
struct osmo_fsm_inst *fi;
+ bool sw_act_rep_received;
bool opstart_sent;
bool adm_unlock_sent;
bool get_attr_sent;