From cce691d19ee8ea3aa844dc7b99acc1c641ba9edc Mon Sep 17 00:00:00 2001 From: Vadim Yanitskiy Date: Fri, 17 Mar 2023 08:58:08 +0700 Subject: [PATCH] rlcmac: do not attempt to decode PTCCH/D blocks, discard them PTCCH/D blocks use different encoding than PDTCH/D blocks, and passing them to gprs_rlcmac_handle_gprs_dl_block() results in decoding errors: DRLCMAC NOTICE rlcmac.c:496 Failed decoding dl ctrl block: 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 2b 2b 2b 2b 2b 2b 2b We don't implement PTCCH yet, so discard these blocks starting at Fn=12 within the period of 104 frames (see 3GPP 45.002, table 6). Change-Id: I555004987cf2daa995b9ea21c90ac699199c4e9a --- src/rlcmac/rlcmac_prim.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/rlcmac/rlcmac_prim.c b/src/rlcmac/rlcmac_prim.c index 4bcd925..8f27ff7 100644 --- a/src/rlcmac/rlcmac_prim.c +++ b/src/rlcmac/rlcmac_prim.c @@ -491,6 +491,12 @@ static int rlcmac_prim_handle_l1ctl_pdch_data_ind(struct osmo_gprs_rlcmac_prim * return -EINVAL; } + /* TODO: handle PTCCH/D (Packet Timing Control CHannel) blocks */ + if ((rlcmac_prim->l1ctl.pdch_data_ind.fn % 104) == 12) { + LOGRLCMAC(LOGL_DEBUG, "Dropping PTCCH/D block (not implemented)\n"); + return 0; + } + if (gprs_rlcmac_mcs_is_gprs(cs)) return gprs_rlcmac_handle_gprs_dl_block(rlcmac_prim, cs);