aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMinh-Quang Nguyen <minh-quang.nguyen@nutaq.com>2016-09-08 11:11:28 -0400
committerMinh-Quang Nguyen <minh-quang.nguyen@nutaq.com>2016-09-08 11:11:28 -0400
commitdd377586892fd79ee4d2e94c83abb2ab22f2ae6c (patch)
treee415d33639f122e2ae7a08a3572c226e7e3e74b2
parentb85ae72f0c00af40488586c172426d8153934e2b (diff)
Implementation of unknown BVCI alarm.
The alarms ID is manufacture-defined by NuRAN Wireless Change-Id: Iab6d4938f5ab2bc1cc637da54e92931519f95cbb
-rw-r--r--src/gprs_bssgp_pcu.cpp2
-rw-r--r--src/pcu_l1_if.cpp12
-rw-r--r--src/pcuif_proto.h1
3 files changed, 15 insertions, 0 deletions
diff --git a/src/gprs_bssgp_pcu.cpp b/src/gprs_bssgp_pcu.cpp
index 70b21ce..4c7ca7c 100644
--- a/src/gprs_bssgp_pcu.cpp
+++ b/src/gprs_bssgp_pcu.cpp
@@ -363,6 +363,8 @@ static int gprs_bssgp_pcu_rcvmsg(struct msgb *msg)
LOGP(DBSSGP, LOGL_NOTICE, "NSEI=%u/BVCI=%u Rejecting PDU "
"type %u for unknown BVCI\n", msgb_nsei(msg), ns_bvci,
pdu_type);
+ memcpy(alarm_sig_data.spare, &ns_bvci, sizeof(uint16_t));
+ osmo_signal_dispatch(SS_L_GLOBAL, S_PCU_NM_UNKN_NSEI_BVCI_ALARM, &alarm_sig_data);
return bssgp_tx_status(BSSGP_CAUSE_UNKNOWN_BVCI, NULL, msg);
}
diff --git a/src/pcu_l1_if.cpp b/src/pcu_l1_if.cpp
index 9f3500e..57beaf9 100644
--- a/src/pcu_l1_if.cpp
+++ b/src/pcu_l1_if.cpp
@@ -760,6 +760,18 @@ static int handle_pcu_fail_evt_rep_sig(unsigned int subsys, unsigned int signal,
PCU_NM_EVT_CAUSE_MAJ_PTP_BVC_FAIL,
sig_data->add_text);
break;
+
+ case S_PCU_NM_UNKN_NSEI_BVCI_ALARM:
+ memcpy(&val, sig_data->spare, sizeof(uint16_t));
+ snprintf(log_msg, 100, "PCU: Rx unknown BVCI %d\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_UNKN_NSEI_BVCI,
+ sig_data->add_text);
+ break;
+
default:
break;
}
diff --git a/src/pcuif_proto.h b/src/pcuif_proto.h
index 9123b96..f3d9214 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_UNKN_NSEI_BVCI = 0x3317,
PCU_NM_EVT_CAUSE_MAJ_PTP_BVC_FAIL = 0x3318,
/* Warning causes */
PCU_NM_EVT_CAUSE_WARN_NO_PDCH_AVAIL = 0x3011,