aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMinh-Quang Nguyen <minh-quang.nguyen@nutaq.com>2016-09-02 09:53:14 -0400
committerMinh-Quang Nguyen <minh-quang.nguyen@nutaq.com>2016-09-02 09:53:14 -0400
commitc1dc396e816847a70163ffce9e2d5df13342e063 (patch)
tree26afc9797921cfc5fb2accc8d8c5f4864946156c
parentc37cbb45f509529fedfb19f4a146420d61d503d1 (diff)
LC15: Allow BTS to forward PCU failure alarms to network
-rw-r--r--include/osmo-bts/oml.h1
-rw-r--r--include/osmo-bts/pcuif_proto.h12
-rw-r--r--src/common/oml.c8
-rw-r--r--src/common/pcu_sock.c23
4 files changed, 44 insertions, 0 deletions
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 @@ enum oml_fail_evt_rep_sig {
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 @@ struct gsm_pcu_if_pag_req {
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 {
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 @@ static int handle_oml_fail_evt_rep_sig(unsigned int subsys, unsigned int signal,
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 @@ static int pcu_rx_act_req(struct gsm_bts *bts,
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 @@ static int pcu_rx(struct gsm_network *net, uint8_t msg_type,
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);