diff options
author | Philipp Maier <pmaier@sysmocom.de> | 2017-03-06 14:44:57 +0100 |
---|---|---|
committer | Philipp Maier <pmaier@sysmocom.de> | 2017-03-20 12:36:21 +0100 |
commit | b609ee879eb798f8f3836223b4702745f3f6491e (patch) | |
tree | 68b7f5ddb8ca37e1293edbbc7bd5cd66f9c53948 /include | |
parent | f9eef0ce3eaa24e9e448d2a81d9a3958a05e077b (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')
-rw-r--r-- | include/osmo-bts/l1sap.h | 5 |
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, |