fixeria has uploaded this change for review. ( 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/rlcmac.c 4 files changed, 29 insertions(+), 9 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/22/33222/1
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 8e55b7b..83ee79c 100644 --- a/src/host/layer23/src/common/l1ctl.c +++ b/src/host/layer23/src/common/l1ctl.c @@ -1034,7 +1034,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; @@ -1047,17 +1047,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; @@ -1070,11 +1073,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/rlcmac.c b/src/host/layer23/src/modem/rlcmac.c index fcd2b2e..90710f5 100644 --- a/src/host/layer23/src/modem/rlcmac.c +++ b/src/host/layer23/src/modem/rlcmac.c @@ -162,11 +162,13 @@ case OSMO_PRIM(OSMO_GPRS_RLCMAC_L1CTL_CFG_UL_TBF, PRIM_OP_REQUEST): return 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 */); case OSMO_PRIM(OSMO_GPRS_RLCMAC_L1CTL_CFG_DL_TBF, PRIM_OP_REQUEST): return 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); default: LOGP(DRLCMAC, LOGL_DEBUG, "%s(): Unexpected Rx %s\n", __func__, pdu_name);