aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2013-11-04 14:56:09 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-11-05 15:38:57 +0100
commit0133ff386646bf8b29075502f233f2641d51255a (patch)
treed087a113199b8a4a12a64f716d9bb434621cd516
parentf9dd260ee56f4f71846ab155bfa6e4480e9793ca (diff)
sysmobts: Add L1P_T_INVALID to l1prim_type
Currently uninitialized elements of the femtobts_sysprim_type array are mistaken as L1P_T_REQ (which is accidently the first element and thus 0). This patch adds a new element to the enum that has the value 0 to detect uninitialized elements of the femtobts_sysprim_type array. Those will then show up in the log as 'SYS Prim XXX is not a Request!'. This patch also adds missing definitions of the CalibTbl messages in the femtobts_sysprim_type mapping so that the requests can still be identified as such. Sponsored-by: On-Waves ehf
-rw-r--r--src/osmo-bts-sysmo/femtobts.c10
-rw-r--r--src/osmo-bts-sysmo/femtobts.h1
2 files changed, 11 insertions, 0 deletions
diff --git a/src/osmo-bts-sysmo/femtobts.c b/src/osmo-bts-sysmo/femtobts.c
index 6bd9ce43..1e513bf2 100644
--- a/src/osmo-bts-sysmo/femtobts.c
+++ b/src/osmo-bts-sysmo/femtobts.c
@@ -106,6 +106,16 @@ const enum l1prim_type femtobts_sysprim_type[SuperFemto_PrimId_NUM] = {
[SuperFemto_PrimId_RfClockSetupCnf] = L1P_T_CONF,
[SuperFemto_PrimId_Layer1ResetReq] = L1P_T_REQ,
[SuperFemto_PrimId_Layer1ResetCnf] = L1P_T_CONF,
+#if SUPERFEMTO_API_VERSION >= SUPERFEMTO_API(2,1,0)
+ [SuperFemto_PrimId_GetTxCalibTblReq] = L1P_T_REQ,
+ [SuperFemto_PrimId_GetTxCalibTblCnf] = L1P_T_CONF,
+ [SuperFemto_PrimId_SetTxCalibTblReq] = L1P_T_REQ,
+ [SuperFemto_PrimId_SetTxCalibTblCnf] = L1P_T_CONF,
+ [SuperFemto_PrimId_GetRxCalibTblReq] = L1P_T_REQ,
+ [SuperFemto_PrimId_GetRxCalibTblCnf] = L1P_T_CONF,
+ [SuperFemto_PrimId_SetRxCalibTblReq] = L1P_T_REQ,
+ [SuperFemto_PrimId_SetRxCalibTblCnf] = L1P_T_CONF,
+#endif
};
const struct value_string femtobts_sysprim_names[SuperFemto_PrimId_NUM+1] = {
diff --git a/src/osmo-bts-sysmo/femtobts.h b/src/osmo-bts-sysmo/femtobts.h
index 72397571..a2b8deab 100644
--- a/src/osmo-bts-sysmo/femtobts.h
+++ b/src/osmo-bts-sysmo/femtobts.h
@@ -44,6 +44,7 @@
(OSMO_MAX(sizeof(SuperFemto_Prim_t), sizeof(GsmL1_Prim_t)) + 128)
enum l1prim_type {
+ L1P_T_INVALID, /* this must be 0 to detect uninitialized elements */
L1P_T_REQ,
L1P_T_CONF,
L1P_T_IND,