[PATCH] osmo-bts[master]: LC15: Allow BTS to forward PCU failure alarms to network

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Minh-Quang Nguyen gerrit-no-reply at lists.osmocom.org
Fri Sep 2 18:07:54 UTC 2016


Review at  https://gerrit.osmocom.org/810

LC15: Allow BTS to forward PCU failure alarms to network

Change-Id: I39bb8f8b749e94394909aa4a4be000c306ed712a
---
M include/osmo-bts/oml.h
M include/osmo-bts/pcuif_proto.h
M src/common/oml.c
M src/common/pcu_sock.c
4 files changed, 44 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/10/810/1

diff --git a/include/osmo-bts/oml.h b/include/osmo-bts/oml.h
index b3ccf9d..fb49078 100644
--- a/include/osmo-bts/oml.h
+++ b/include/osmo-bts/oml.h
@@ -27,6 +27,7 @@
 	S_NM_OML_BTS_FAIL_OPEN_CALIB_ALARM,
 	S_NM_OML_BTS_FAIL_VERIFY_CALIB_ALARM,
 	S_NM_OML_BTS_NO_CALIB_PATH_ALARM,
+	S_NM_OML_BTS_RX_PCU_FAIL_EVT_ALARM,
 };
 
 struct oml_fail_evt_rep_sig_data {
diff --git a/include/osmo-bts/pcuif_proto.h b/include/osmo-bts/pcuif_proto.h
index 5527238..b961229 100644
--- a/include/osmo-bts/pcuif_proto.h
+++ b/include/osmo-bts/pcuif_proto.h
@@ -14,6 +14,9 @@
 #define PCU_IF_MSG_TIME_IND	0x52	/* GSM time indication */
 #define PCU_IF_MSG_PAG_REQ	0x60	/* paging request */
 
+/*alarms & performance counters */
+#define PCU_IF_MSG_FAILURE_EVT_IND 	0x61 /* PCU failure event report indication*/
+
 /* sapi */
 #define PCU_IF_SAPI_RACH	0x01	/* channel request on CCCH */
 #define PCU_IF_SAPI_AGCH	0x02	/* assignment on AGCH */
@@ -136,6 +139,14 @@
 	uint8_t		identity_lv[9];
 } __attribute__ ((packed));
 
+struct gsm_pcu_if_fail_evt_ind {
+	uint8_t 	event_type;
+	uint8_t 	event_serverity;
+	uint8_t 	cause_type;
+	uint16_t 	event_cause;
+	char		add_text[100];
+}__attribute__ ((packed));
+
 struct gsm_pcu_if {
 	/* context based information */
 	uint8_t		msg_type;	/* message type */
@@ -152,6 +163,7 @@
 		struct gsm_pcu_if_act_req	act_req;
 		struct gsm_pcu_if_time_ind	time_ind;
 		struct gsm_pcu_if_pag_req	pag_req;
+		struct gsm_pcu_if_fail_evt_ind	failure_evt_ind;
 	} u;
 } __attribute__ ((packed));
 
diff --git a/src/common/oml.c b/src/common/oml.c
index 924c4dc..13a4799 100644
--- a/src/common/oml.c
+++ b/src/common/oml.c
@@ -1552,6 +1552,14 @@
 				sig_data->add_text);
 		break;
 
+	case S_NM_OML_BTS_RX_PCU_FAIL_EVT_ALARM:
+		rc = oml_tx_nm_fail_evt_rep(sig_data->mo,
+				sig_data->event_type,
+				sig_data->event_serverity,
+				sig_data->cause_type,
+				sig_data->event_cause,
+				sig_data->add_text);
+		break;
 	default:
 		break;
 	}
diff --git a/src/common/pcu_sock.c b/src/common/pcu_sock.c
index bd50be1..78c5fe8 100644
--- a/src/common/pcu_sock.c
+++ b/src/common/pcu_sock.c
@@ -604,6 +604,26 @@
 	return 0;
 }
 
+static int pcu_rx_failure_event_rep(struct gsm_bts *bts, struct gsm_pcu_if_fail_evt_ind *fail_ind)
+{
+	LOGP(DPCU, LOGL_DEBUG, "[PCU] Failure EVT REP detailed: evt_type=%02x, evt_serv=%02x, cause_type=%02x, cause_id=%04x, text=%s\n",
+			fail_ind->event_type,
+			fail_ind->event_serverity,
+			fail_ind->cause_type,
+			fail_ind->event_cause,
+			fail_ind->add_text);
+
+	alarm_sig_data.mo  = &bts->gprs.cell.mo;
+	alarm_sig_data.event_type = fail_ind->event_type;
+	alarm_sig_data.event_serverity = fail_ind->event_serverity;
+	alarm_sig_data.cause_type = fail_ind->cause_type;
+	alarm_sig_data.event_cause = fail_ind->event_cause;
+	alarm_sig_data.add_text = &fail_ind->add_text[0];
+	osmo_signal_dispatch(SS_NM, S_NM_OML_BTS_RX_PCU_FAIL_EVT_ALARM, &alarm_sig_data);
+
+	return alarm_sig_data.rc;
+}
+
 static int pcu_rx(struct gsm_network *net, uint8_t msg_type,
 	struct gsm_pcu_if *pcu_prim)
 {
@@ -621,6 +641,9 @@
 	case PCU_IF_MSG_ACT_REQ:
 		rc = pcu_rx_act_req(bts, &pcu_prim->u.act_req);
 		break;
+	case PCU_IF_MSG_FAILURE_EVT_IND:
+		rc = pcu_rx_failure_event_rep(bts, &pcu_prim->u.failure_evt_ind);
+		break;
 	default:
 		LOGP(DPCU, LOGL_ERROR, "Received unknwon PCU msg type %d\n",
 			msg_type);

-- 
To view, visit https://gerrit.osmocom.org/810
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I39bb8f8b749e94394909aa4a4be000c306ed712a
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Minh-Quang Nguyen <minh-quang.nguyen at nutaq.com>



More information about the gerrit-log mailing list