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

Change subject: l1ctl_proto: add 'start_fn' field to UL/DL TBF CFG.req messages
......................................................................

l1ctl_proto: add 'start_fn' field to UL/DL TBF CFG.req messages

Change-Id: Ibb6a05165fe1c81268fb0e3674adae4065e78171
Related: OS#5500
---
M include/l1ctl_proto.h
M src/host/layer23/include/osmocom/bb/common/l1ctl.h
M src/host/layer23/src/common/l1ctl.c
M src/host/layer23/src/modem/grr.c
4 files changed, 29 insertions(+), 9 deletions(-)

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




diff --git a/include/l1ctl_proto.h b/include/l1ctl_proto.h
index 3512424..f0bc56d 100644
--- a/include/l1ctl_proto.h
+++ b/include/l1ctl_proto.h
@@ -350,6 +350,7 @@
        uint8_t tbf_ref;
        uint8_t slotmask;
        uint8_t padding[2];
+       uint32_t start_fn; /* TBF Starting Time (absolute Fn) */
 } __attribute__((packed));

 /* payload of L1CTL_GPRS_DL_TBF_CFG_REQ */
@@ -358,6 +359,7 @@
        uint8_t slotmask;
        uint8_t dl_tfi;
        uint8_t padding[1];
+       uint32_t start_fn; /* TBF Starting Time (absolute Fn) */
 } __attribute__((packed));

 /* part of L1CTL_GPRS_{UL,DL}_BLOCK_{REQ,IND} */
diff --git a/src/host/layer23/include/osmocom/bb/common/l1ctl.h 
b/src/host/layer23/include/osmocom/bb/common/l1ctl.h
index 25bc6e8..40b3159 100644
--- a/src/host/layer23/include/osmocom/bb/common/l1ctl.h
+++ b/src/host/layer23/include/osmocom/bb/common/l1ctl.h
@@ -81,10 +81,11 @@

 /* Transmit L1CTL_GPRS_UL_TBF_CFG_REQ */
 int l1ctl_tx_gprs_ul_tbf_cfg_req(struct osmocom_ms *ms, uint8_t tbf_ref,
-                                uint8_t slotmask);
+                                uint8_t slotmask, uint32_t start_fn);

 /* Transmit L1CTL_GPRS_DL_TBF_CFG_REQ */
 int l1ctl_tx_gprs_dl_tbf_cfg_req(struct osmocom_ms *ms, uint8_t tbf_ref,
-                                uint8_t slotmask, uint8_t dl_tfi);
+                                uint8_t slotmask, uint32_t start_fn,
+                                uint8_t dl_tfi);

 #endif
diff --git a/src/host/layer23/src/common/l1ctl.c 
b/src/host/layer23/src/common/l1ctl.c
index b2ad505..38510d8 100644
--- a/src/host/layer23/src/common/l1ctl.c
+++ b/src/host/layer23/src/common/l1ctl.c
@@ -1011,7 +1011,7 @@

 /* Transmit L1CTL_GPRS_UL_TBF_CFG_REQ */
 int l1ctl_tx_gprs_ul_tbf_cfg_req(struct osmocom_ms *ms, uint8_t tbf_ref,
-                                uint8_t slotmask)
+                                uint8_t slotmask, uint32_t start_fn)
 {
        struct l1ctl_gprs_ul_tbf_cfg_req *req;
        struct msgb *msg;
@@ -1024,17 +1024,20 @@
        *req = (struct l1ctl_gprs_ul_tbf_cfg_req) {
                .tbf_ref = tbf_ref,
                .slotmask = slotmask,
+               .start_fn = htonl(start_fn),
        };

-       DEBUGP(DL1C, "Tx GPRS UL TBF CFG (tbf_ref=%u, slotmask=0x%02x)\n",
-              tbf_ref, slotmask);
+       DEBUGP(DL1C, "Tx GPRS UL TBF CFG: "
+              "tbf_ref=%u, slotmask=0x%02x, start_fn=%u\n",
+              tbf_ref, slotmask, start_fn);

        return osmo_send_l1(ms, msg);
 }

 /* Transmit L1CTL_GPRS_DL_TBF_CFG_REQ */
 int l1ctl_tx_gprs_dl_tbf_cfg_req(struct osmocom_ms *ms, uint8_t tbf_ref,
-                                uint8_t slotmask, uint8_t dl_tfi)
+                                uint8_t slotmask, uint32_t start_fn,
+                                uint8_t dl_tfi)
 {
        struct l1ctl_gprs_dl_tbf_cfg_req *req;
        struct msgb *msg;
@@ -1047,11 +1050,13 @@
        *req = (struct l1ctl_gprs_dl_tbf_cfg_req) {
                .tbf_ref = tbf_ref,
                .slotmask = slotmask,
+               .start_fn = htonl(start_fn),
                .dl_tfi = dl_tfi,
        };

-       DEBUGP(DL1C, "Tx GPRS DL TBF CFG (tbf_ref=%u, slotmask=0x%02x, 
dl_tfi=%u)\n",
-              tbf_ref, slotmask, dl_tfi);
+       DEBUGP(DL1C, "Tx GPRS DL TBF CFG: "
+              "tbf_ref=%u, slotmask=0x%02x, start_fn=%u, dl_tfi=%u)\n",
+              tbf_ref, slotmask, start_fn, dl_tfi);

        return osmo_send_l1(ms, msg);
 }
diff --git a/src/host/layer23/src/modem/grr.c b/src/host/layer23/src/modem/grr.c
index 12d7059..e4fd23c 100644
--- a/src/host/layer23/src/modem/grr.c
+++ b/src/host/layer23/src/modem/grr.c
@@ -661,7 +661,8 @@
                const struct osmo_gprs_rlcmac_l1ctl_prim *lp = data;
                l1ctl_tx_gprs_ul_tbf_cfg_req(ms,
                                             lp->cfg_ul_tbf_req.ul_tbf_nr,
-                                            lp->cfg_ul_tbf_req.ul_slotmask);
+                                            lp->cfg_ul_tbf_req.ul_slotmask,
+                                            0xffffffff /* TODO: start Fn */);
                break;
        }
        case GRR_EV_PDCH_DL_TBF_CFG_REQ:
@@ -670,6 +671,7 @@
                l1ctl_tx_gprs_dl_tbf_cfg_req(ms,
                                             lp->cfg_dl_tbf_req.dl_tbf_nr,
                                             lp->cfg_dl_tbf_req.dl_slotmask,
+                                            0xffffffff, /* TODO: start Fn */
                                             lp->cfg_dl_tbf_req.dl_tfi);
                break;
        }

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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: Ibb6a05165fe1c81268fb0e3674adae4065e78171
Gerrit-Change-Number: 33222
Gerrit-PatchSet: 4
Gerrit-Owner: fixeria <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Reviewer: osmith <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>
Gerrit-MessageType: merged

Reply via email to