aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bts-sysmo/l1_if.h
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-08-09 09:17:14 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-08-09 09:42:56 +0200
commit88d60a1f86b083d6154c299aceceab44595f34d7 (patch)
tree1cdb8001181bda01e9627f736a94d436636aec53 /src/osmo-bts-sysmo/l1_if.h
parent2cc37035d73191b71b9ba9c0d559a0da6a5f35e5 (diff)
sysmobts: Add a unit test that checks of the behavior
We need to build a lot more code to be able to test these two new routines. I didn't want to move the code to a utils file as the check is called from a hot path. Add accessors to the inlined variant to be used by the unit test. While writing the unit tests I noticed that a re-transmission of the ciphering command would lead to an attempt to enable ciphering again. I am not sure that this MphConfig is idempotent.
Diffstat (limited to 'src/osmo-bts-sysmo/l1_if.h')
-rw-r--r--src/osmo-bts-sysmo/l1_if.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/osmo-bts-sysmo/l1_if.h b/src/osmo-bts-sysmo/l1_if.h
index 1168aeaf..77144931 100644
--- a/src/osmo-bts-sysmo/l1_if.h
+++ b/src/osmo-bts-sysmo/l1_if.h
@@ -7,6 +7,8 @@
#include <osmocom/core/timer.h>
#include <osmocom/gsm/gsm_utils.h>
+#include <sysmocom/femtobts/gsml1prim.h>
+
enum {
MQ_SYS_READ,
MQ_L1_READ,
@@ -124,4 +126,10 @@ int calib_load(struct femtol1_hdl *fl1h);
int l1if_rf_clock_info_reset(struct femtol1_hdl *fl1h);
int l1if_rf_clock_info_correct(struct femtol1_hdl *fl1h);
+/* public helpers for test */
+int bts_check_for_ciph_cmd(struct femtol1_hdl *fl1h,
+ struct msgb *msg, struct gsm_lchan *lchan);
+void bts_check_for_first_ciphrd(struct femtol1_hdl *fl1h,
+ GsmL1_MsgUnitParam_t *msgUnitParam,
+ struct gsm_lchan *lchan);
#endif /* _FEMTO_L1_H */