pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/34133 )


Change subject: layer23: modem: Pass fn from lapdm to L1CTL-CCCH_DATA.ind
......................................................................

layer23: modem: Pass fn from lapdm to L1CTL-CCCH_DATA.ind

Change-Id: I7a9f31ae363fe7de019ff1a906f3978ff3074036
---
M src/host/layer23/src/modem/grr.c
1 file changed, 21 insertions(+), 3 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/33/34133/1

diff --git a/src/host/layer23/src/modem/grr.c b/src/host/layer23/src/modem/grr.c
index 5df0ac2..514b41d 100644
--- a/src/host/layer23/src/modem/grr.c
+++ b/src/host/layer23/src/modem/grr.c
@@ -95,9 +95,10 @@
 static int forward_to_rlcmac(struct osmocom_ms *ms, struct msgb *msg)
 {
        struct osmo_gprs_rlcmac_prim *rlcmac_prim;
+       uint32_t fn = *(uint32_t *)(&msg->cb[0]);

        /* Forward SI13 to RLC/MAC layer */
-       rlcmac_prim = osmo_gprs_rlcmac_prim_alloc_l1ctl_ccch_data_ind(0 /* 
TODO: fn */, msgb_l3(msg));
+       rlcmac_prim = osmo_gprs_rlcmac_prim_alloc_l1ctl_ccch_data_ind(fn, 
msgb_l3(msg));
        return osmo_gprs_rlcmac_prim_lower_up(rlcmac_prim);
 }

@@ -204,9 +205,10 @@
 {
        const struct gsm48_system_information_type_header *si_hdr = 
msgb_l3(msg);
        const uint8_t si_type = si_hdr->system_information;
+       const uint32_t fn = *(uint32_t *)(&msg->cb[0]);

-       LOGP(DRR, LOGL_INFO, "BCCH message (type=0x%02x): %s\n",
-            si_type, gsm48_rr_msg_name(si_type));
+       LOGP(DRR, LOGL_INFO, "FN=%u BCCH message (type=0x%02x): %s\n",
+            fn, si_type, gsm48_rr_msg_name(si_type));

        switch (si_type) {
        case GSM48_MT_RR_SYSINFO_1:
@@ -375,6 +377,13 @@
        }

        msg->l3h = (uint8_t *)TLVP_VAL(&tv, RSL_IE_L3_INFO);
+       if (TLVP_PRESENT(&tv, RSL_IE_OSMO_ABS_FRAME_NUMBER)) {
+               memcpy(&msg->cb[0], TLVP_VAL(&tv, RSL_IE_OSMO_ABS_FRAME_NUMBER),
+                      TLVP_LEN(&tv, RSL_IE_OSMO_ABS_FRAME_NUMBER));
+               *(uint32_t *)(&msg->cb[0]) = osmo_load32be(&msg->cb[0]);
+       } else {
+               *(uint32_t *)(&msg->cb[0]) = UINT32_MAX;
+       }

        switch (rllh->chan_nr) {
        case RSL_CHAN_PCH_AGCH:

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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I7a9f31ae363fe7de019ff1a906f3978ff3074036
Gerrit-Change-Number: 34133
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <[email protected]>
Gerrit-MessageType: newchange

Reply via email to