pespin has submitted this change. (
https://gerrit.osmocom.org/c/osmo-pcu/+/29885 )
Change subject: tbf_ul_ack_fsm: Pass ul_tbf instead of generic tbf
......................................................................
tbf_ul_ack_fsm: Pass ul_tbf instead of generic tbf
The UL_ACK_NACK FSM is only used in Uplink TBFs.
Change-Id: Ic9893d274f4b6fafc75a615f7d6dcb9433b94ace
---
M src/tbf_ul_ack_fsm.c
M src/tbf_ul_ack_fsm.h
2 files changed, 12 insertions(+), 14 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, but someone else must approve
osmith: Looks good to me, approved
diff --git a/src/tbf_ul_ack_fsm.c b/src/tbf_ul_ack_fsm.c
index 364ef00..2ccc493 100644
--- a/src/tbf_ul_ack_fsm.c
+++ b/src/tbf_ul_ack_fsm.c
@@ -216,7 +216,7 @@
}
-struct msgb *tbf_ul_ack_create_rlcmac_msg(const struct gprs_rlcmac_tbf *tbf, uint32_t fn,
uint8_t ts)
+struct msgb *tbf_ul_ack_create_rlcmac_msg(const struct gprs_rlcmac_ul_tbf *ul_tbf,
uint32_t fn, uint8_t ts)
{
int rc;
struct tbf_ul_ack_ev_create_rlcmac_msg_ctx data_ctx = {
@@ -224,31 +224,29 @@
.ts = ts,
.msg = NULL,
};
- OSMO_ASSERT(tbf_direction(tbf) == GPRS_RLCMAC_UL_TBF);
- rc = osmo_fsm_inst_dispatch(tbf_ul_ack_fi((const struct gprs_rlcmac_ul_tbf *)tbf),
TBF_UL_ACK_EV_CREATE_RLCMAC_MSG, &data_ctx);
+ rc = osmo_fsm_inst_dispatch(tbf_ul_ack_fi(ul_tbf), TBF_UL_ACK_EV_CREATE_RLCMAC_MSG,
&data_ctx);
if (rc != 0 || !data_ctx.msg)
return NULL;
return data_ctx.msg;
}
-bool tbf_ul_ack_rts(const struct gprs_rlcmac_tbf *tbf)
+bool tbf_ul_ack_rts(const struct gprs_rlcmac_ul_tbf *ul_tbf)
{
- struct osmo_fsm_inst *fi = tbf_ul_ack_fi((const struct gprs_rlcmac_ul_tbf *)tbf);
+ struct osmo_fsm_inst *fi = tbf_ul_ack_fi(ul_tbf);
return fi->state == TBF_UL_ACK_ST_SCHED_UL_ACK;
}
/* Did we already send the Final ACK and we are waiting for its confirmation (CTRL ACK) ?
*/
-bool tbf_ul_ack_waiting_cnf_final_ack(const struct gprs_rlcmac_tbf* tbf)
+bool tbf_ul_ack_waiting_cnf_final_ack(const struct gprs_rlcmac_ul_tbf *ul_tbf)
{
- OSMO_ASSERT(tbf_direction(tbf) == GPRS_RLCMAC_UL_TBF);
- struct osmo_fsm_inst *fi = tbf_ul_ack_fi((const struct gprs_rlcmac_ul_tbf *)tbf);
+ struct osmo_fsm_inst *fi = tbf_ul_ack_fi(ul_tbf);
return fi->state == TBF_UL_ACK_ST_WAIT_ACK;
}
-bool tbf_ul_ack_exp_ctrl_ack(const struct gprs_rlcmac_tbf *tbf, uint32_t fn, uint8_t ts)
+bool tbf_ul_ack_exp_ctrl_ack(const struct gprs_rlcmac_ul_tbf *ul_tbf, uint32_t fn,
uint8_t ts)
{
- struct osmo_fsm_inst *fi = tbf_ul_ack_fi((const struct gprs_rlcmac_ul_tbf *)tbf);
+ struct osmo_fsm_inst *fi = tbf_ul_ack_fi(ul_tbf);
return fi->state == TBF_UL_ACK_ST_WAIT_ACK;
/* FIXME: validate FN and TS match: && ctx->poll_fn = fn &&
ctx->poll_ts == ts */
}
diff --git a/src/tbf_ul_ack_fsm.h b/src/tbf_ul_ack_fsm.h
index d2e9332..f25972e 100644
--- a/src/tbf_ul_ack_fsm.h
+++ b/src/tbf_ul_ack_fsm.h
@@ -62,7 +62,7 @@
};
-struct msgb *tbf_ul_ack_create_rlcmac_msg(const struct gprs_rlcmac_tbf *tbf, uint32_t fn,
uint8_t ts);
-bool tbf_ul_ack_rts(const struct gprs_rlcmac_tbf *tbf);
-bool tbf_ul_ack_waiting_cnf_final_ack(const struct gprs_rlcmac_tbf *tbf);
-bool tbf_ul_ack_exp_ctrl_ack(const struct gprs_rlcmac_tbf *tbf, uint32_t fn, uint8_t
ts);
+struct msgb *tbf_ul_ack_create_rlcmac_msg(const struct gprs_rlcmac_ul_tbf *ul_tbf,
uint32_t fn, uint8_t ts);
+bool tbf_ul_ack_rts(const struct gprs_rlcmac_ul_tbf *ul_tbf);
+bool tbf_ul_ack_waiting_cnf_final_ack(const struct gprs_rlcmac_ul_tbf *ul_tbf);
+bool tbf_ul_ack_exp_ctrl_ack(const struct gprs_rlcmac_ul_tbf *ul_tbf, uint32_t fn,
uint8_t ts);
3 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
--
To view, visit
https://gerrit.osmocom.org/c/osmo-pcu/+/29885
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: Ic9893d274f4b6fafc75a615f7d6dcb9433b94ace
Gerrit-Change-Number: 29885
Gerrit-PatchSet: 4
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged