diff options
author | Vadim Yanitskiy <vyanitskiy@sysmocom.de> | 2023-05-31 02:52:57 +0700 |
---|---|---|
committer | fixeria <vyanitskiy@sysmocom.de> | 2023-06-07 15:53:54 +0000 |
commit | 21541a748e7a55826ab58a9d810ec7b3c1732da5 (patch) | |
tree | 1d0e7887fa179f4cf1f5e111127c394eb9fdfb3a | |
parent | dae9add949e6a288632da33ed73ac1c263201e43 (diff) |
l1gprs: properly handle (forward) PTCCH/D blocks
Unconditionally forward PTCCH/D blocks towards the upper layers.
Calling l1gprs_pdch_filter_dl_block() on them makes no sense.
Change-Id: Ifcc53d442426c8bfdacd3d179e20bb45c43f4644
Fixes: BTS_Tests.TC_pcu_ptcch (DL part)
Related: OS#5500, OS#5955
-rw-r--r-- | src/shared/l1gprs.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/shared/l1gprs.c b/src/shared/l1gprs.c index 5874b482..fd18e4ea 100644 --- a/src/shared/l1gprs.c +++ b/src/shared/l1gprs.c @@ -383,6 +383,10 @@ int l1gprs_handle_ul_block_req(struct l1gprs_state *gprs, return 0; } +/* Check if a Downlink block is a PTCCH/D (see 3GPP TS 45.002, table 6) */ +#define BLOCK_IND_IS_PTCCH(ind) \ + (((ind)->hdr.fn % 104) == 12) + struct msgb *l1gprs_handle_dl_block_ind(struct l1gprs_state *gprs, const struct l1gprs_prim_dl_block_ind *ind) { @@ -401,7 +405,8 @@ struct msgb *l1gprs_handle_dl_block_ind(struct l1gprs_state *gprs, pdch = &gprs->pdch[ind->hdr.tn]; LOGP_PDCH(pdch, LOGL_DEBUG, - "Rx DL BLOCK.ind (fn=%u, len=%zu): %s\n", + "Rx DL BLOCK.ind (%s, fn=%u, len=%zu): %s\n", + BLOCK_IND_IS_PTCCH(ind) ? "PTCCH" : "PDTCH", ind->hdr.fn, ind->data_len, osmo_hexdump(ind->data, ind->data_len)); if ((pdch->ul_tbf_count == 0) && (pdch->dl_tbf_count == 0)) { @@ -432,6 +437,10 @@ struct msgb *l1gprs_handle_dl_block_ind(struct l1gprs_state *gprs, if (ind->data_len == 0) return msg; + if (BLOCK_IND_IS_PTCCH(ind)) { + memcpy(msgb_put(msg, ind->data_len), ind->data, ind->data_len); + return msg; + } cs = osmo_gprs_dl_cs_by_block_bytes(ind->data_len); switch (cs) { |