aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMinh-Quang Nguyen <minh-quang.nguyen@nutaq.com>2016-09-08 09:58:42 -0400
committerMinh-Quang Nguyen <minh-quang.nguyen@nutaq.com>2016-09-08 09:59:05 -0400
commitb85ae72f0c00af40488586c172426d8153934e2b (patch)
tree7d0212ca84081ca064ac1896db6d8270a26ef980
parent379649cfcdd8ff449cd97be895431ea45ed32383 (diff)
Implementation of PTP BVC failure alarm
The alarm cause ID is manufacture-defined by NuRAN Wireless Change-Id: I29b8aa4f247d5676a26e7e7f3fb862276136fad3
-rw-r--r--src/gprs_bssgp_pcu.cpp4
-rw-r--r--src/pcu_l1_if.cpp24
-rw-r--r--src/pcuif_proto.h1
3 files changed, 22 insertions, 7 deletions
diff --git a/src/gprs_bssgp_pcu.cpp b/src/gprs_bssgp_pcu.cpp
index a4f77b9..70b21ce 100644
--- a/src/gprs_bssgp_pcu.cpp
+++ b/src/gprs_bssgp_pcu.cpp
@@ -387,6 +387,10 @@ static int gprs_bssgp_pcu_rcvmsg(struct msgb *msg)
{
LOGP(DBSSGP, LOGL_DEBUG, "rx BVCI_PTP gprs_bssgp_rx_ptp\n");
rc = gprs_bssgp_pcu_rx_ptp(msg, &tp, bctx);
+ if (rc < 0) {
+ memcpy(alarm_sig_data.spare, &ns_bvci, sizeof(uint16_t));
+ osmo_signal_dispatch(SS_L_GLOBAL, S_PCU_NM_FAIL_PTP_BVC_ALARM, &alarm_sig_data);
+ }
}
return rc;
}
diff --git a/src/pcu_l1_if.cpp b/src/pcu_l1_if.cpp
index 3fb00f3..9f3500e 100644
--- a/src/pcu_l1_if.cpp
+++ b/src/pcu_l1_if.cpp
@@ -624,7 +624,7 @@ static int handle_pcu_fail_evt_rep_sig(unsigned int subsys, unsigned int signal,
int rc = 0;
unsigned int res;
char log_msg[100];
- uint16_t nscvi;
+ uint16_t val;
if (subsys != SS_L_GLOBAL)
return 0;
@@ -717,8 +717,8 @@ static int handle_pcu_fail_evt_rep_sig(unsigned int subsys, unsigned int signal,
break;
case S_PCU_NM_FAIL_NSVC_ALARM:
- memcpy(&nscvi, sig_data->spare, sizeof(uint16_t));
- snprintf(log_msg, 100, "PCU: NS-VC %d failure\n", nscvi);
+ memcpy(&val, sig_data->spare, sizeof(uint16_t));
+ snprintf(log_msg, 100, "PCU: NS-VC %d failure\n", val);
sig_data->add_text = &log_msg[0];
rc = pcu_tx_nm_fail_evt(NM_EVT_COMM_FAIL,
@@ -729,8 +729,8 @@ static int handle_pcu_fail_evt_rep_sig(unsigned int subsys, unsigned int signal,
break;
case S_PCU_NM_FAIL_RST_NSVC_ALARM:
- memcpy(&nscvi, sig_data->spare, sizeof(uint16_t));
- snprintf(log_msg, 100, "PCU: NS-VC %d reset failure\n", nscvi);
+ memcpy(&val, sig_data->spare, sizeof(uint16_t));
+ snprintf(log_msg, 100, "PCU: NS-VC %d reset failure\n", val);
sig_data->add_text = &log_msg[0];
rc = pcu_tx_nm_fail_evt(NM_EVT_COMM_FAIL,
NM_SEVER_MAJOR,
@@ -740,8 +740,8 @@ static int handle_pcu_fail_evt_rep_sig(unsigned int subsys, unsigned int signal,
break;
case S_PCU_NM_FAIL_UNBLK_NSVC_ALARM:
- memcpy(&nscvi, sig_data->spare, sizeof(uint16_t));
- snprintf(log_msg, 100, "PCU: NS-VC %d unblock failure\n", nscvi);
+ memcpy(&val, sig_data->spare, sizeof(uint16_t));
+ snprintf(log_msg, 100, "PCU: NS-VC %d unblock failure\n", val);
sig_data->add_text = &log_msg[0];
rc = pcu_tx_nm_fail_evt(NM_EVT_COMM_FAIL,
NM_SEVER_MAJOR,
@@ -750,6 +750,16 @@ static int handle_pcu_fail_evt_rep_sig(unsigned int subsys, unsigned int signal,
sig_data->add_text);
break;
+ case S_PCU_NM_FAIL_PTP_BVC_ALARM:
+ memcpy(&val, sig_data->spare, sizeof(uint16_t));
+ snprintf(log_msg, 100, "PCU:BVCI %d PTP failure\n", val);
+ sig_data->add_text = &log_msg[0];
+ rc = pcu_tx_nm_fail_evt(NM_EVT_COMM_FAIL,
+ NM_SEVER_MAJOR,
+ NM_PCAUSE_T_MANUF,
+ PCU_NM_EVT_CAUSE_MAJ_PTP_BVC_FAIL,
+ sig_data->add_text);
+ break;
default:
break;
}
diff --git a/src/pcuif_proto.h b/src/pcuif_proto.h
index 85a9040..9123b96 100644
--- a/src/pcuif_proto.h
+++ b/src/pcuif_proto.h
@@ -68,6 +68,7 @@ enum pcu_nm_event_causes {
PCU_NM_EVT_CAUSE_MAJ_UKWN_L1_PRIM_MSG = 0x3013,
PCU_NM_EVT_CAUSE_MAJ_UKWN_BTS_MSG = 0x3014,
PCU_NM_EVT_CAUSE_MAJ_PDTCH_QUEUE_FULL = 0x333a,
+ PCU_NM_EVT_CAUSE_MAJ_PTP_BVC_FAIL = 0x3318,
/* Warning causes */
PCU_NM_EVT_CAUSE_WARN_NO_PDCH_AVAIL = 0x3011,