fixeria has submitted this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/33100 )

Change subject: l1gprs: properly handle (forward) PTCCH/D blocks
......................................................................

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
---
M src/shared/l1gprs.c
1 file changed, 24 insertions(+), 1 deletion(-)

Approvals:
  laforge: Looks good to me, approved
  pespin: Looks good to me, but someone else must approve
  Jenkins Builder: Verified




diff --git a/src/shared/l1gprs.c b/src/shared/l1gprs.c
index 5874b48..fd18e4e 100644
--- a/src/shared/l1gprs.c
+++ b/src/shared/l1gprs.c
@@ -383,6 +383,10 @@
        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 @@
        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 @@

        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) {

--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/33100
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: Ifcc53d442426c8bfdacd3d179e20bb45c43f4644
Gerrit-Change-Number: 33100
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <[email protected]>
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>
Gerrit-MessageType: merged

Reply via email to