aboutsummaryrefslogtreecommitdiffstats
path: root/include/osmo-bts
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2017-03-06 14:44:57 +0100
committerPhilipp Maier <pmaier@sysmocom.de>2017-03-20 12:36:21 +0100
commitb609ee879eb798f8f3836223b4702745f3f6491e (patch)
tree68b7f5ddb8ca37e1293edbbc7bd5cd66f9c53948 /include/osmo-bts
parentf9eef0ce3eaa24e9e448d2a81d9a3958a05e077b (diff)
l1sap: fix PTCCH detection
The macro L1SAP_IS_PTCCH(fn) only detects a PTCCH channel at fn%52 = 12, the detection logic has been extended in order to detect PTCCH at fn%52 = 38. See also 3GPP TS 05.02, Clause 7, Table 6 of 9 Change-Id: Ia6f3333121e5e920c5e1d562a081d0a1b58a1153
Diffstat (limited to 'include/osmo-bts')
-rw-r--r--include/osmo-bts/l1sap.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/osmo-bts/l1sap.h b/include/osmo-bts/l1sap.h
index 0e564068..6373ba84 100644
--- a/include/osmo-bts/l1sap.h
+++ b/include/osmo-bts/l1sap.h
@@ -32,7 +32,10 @@
/* PTCH layout from frame number */
#define L1SAP_FN2MACBLOCK(fn) ((fn % 52) / 4)
#define L1SAP_FN2PTCCHBLOCK(fn) ((fn / 104) & 3)
-#define L1SAP_IS_PTCCH(fn) ((fn % 52) == 12)
+
+/* Calculate PTCCH occurrence, See also 3GPP TS 05.02, Clause 7, Table 6 of 9 */
+#define L1SAP_IS_PTCCH(fn) (((fn % 52) == 12) || ((fn % 52) == 38))
+
static const uint8_t fill_frame[GSM_MACBLOCK_LEN] = {
0x03, 0x03, 0x01, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B,