summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2023-06-07 23:06:24 +0700
committerPau Espin Pedrol <pespin@sysmocom.de>2023-08-10 15:16:49 +0200
commit8b4640ec19d95735363c635b84ca814d9c35ab76 (patch)
tree722a7cba9c7e79265e0691fea40b0fa62184e97a
parent8bbd0d173fad3708fac3207d56dd04c14912351e (diff)
l1ctl_proto: add 'start_fn' field to UL/DL TBF CFG.req messages
-rw-r--r--include/l1ctl_proto.h2
-rw-r--r--src/host/layer23/include/osmocom/bb/common/l1ctl.h5
-rw-r--r--src/host/layer23/src/common/l1ctl.c17
-rw-r--r--src/host/layer23/src/modem/grr.c4
4 files changed, 19 insertions, 9 deletions
diff --git a/include/l1ctl_proto.h b/include/l1ctl_proto.h
index 3512424f..f0bc56d2 100644
--- a/include/l1ctl_proto.h
+++ b/include/l1ctl_proto.h
@@ -350,6 +350,7 @@ struct l1ctl_gprs_ul_tbf_cfg_req {
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 @@ struct l1ctl_gprs_dl_tbf_cfg_req {
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 25bc6e8e..40b31591 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 @@ int l1ctl_tx_gprs_ul_block_req(struct osmocom_ms *ms, uint32_t fn, uint8_t tn,
/* 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 b2ad505e..38510d83 100644
--- a/src/host/layer23/src/common/l1ctl.c
+++ b/src/host/layer23/src/common/l1ctl.c
@@ -1011,7 +1011,7 @@ int l1ctl_tx_gprs_ul_block_req(struct osmocom_ms *ms, uint32_t fn, uint8_t tn,
/* 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 @@ int l1ctl_tx_gprs_ul_tbf_cfg_req(struct osmocom_ms *ms, uint8_t tbf_ref,
*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 @@ int l1ctl_tx_gprs_dl_tbf_cfg_req(struct osmocom_ms *ms, uint8_t tbf_ref,
*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 12d7059c..e4fd23ca 100644
--- a/src/host/layer23/src/modem/grr.c
+++ b/src/host/layer23/src/modem/grr.c
@@ -661,7 +661,8 @@ static void grr_st_packet_transfer_action(struct osmo_fsm_inst *fi,
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 @@ static void grr_st_packet_transfer_action(struct osmo_fsm_inst *fi,
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;
}