aboutsummaryrefslogtreecommitdiffstats
path: root/src/tbf_ul.h
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2021-07-29 18:39:16 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2021-08-23 17:14:23 +0200
commitea8dbddab1fc4c5ba932f070d2d2bc4126802e22 (patch)
tree7851a999b7fccb6037ba3e207ea07f0d030e311a /src/tbf_ul.h
parent3e48cfd9f3a80abb6f6d51fc1c34987144fda755 (diff)
Move tbf ul_ack_state to osmocom FSM
Diffstat (limited to 'src/tbf_ul.h')
-rw-r--r--src/tbf_ul.h17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/tbf_ul.h b/src/tbf_ul.h
index 826062fa..defdfba8 100644
--- a/src/tbf_ul.h
+++ b/src/tbf_ul.h
@@ -24,6 +24,15 @@
#include <stdbool.h>
#include "tbf.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+#include <tbf_ul_ack_fsm.h>
+#ifdef __cplusplus
+}
+#endif
+
/*
* TBF instance
*/
@@ -54,9 +63,6 @@ struct gprs_rlcmac_ul_tbf : public gprs_rlcmac_tbf {
gprs_rlcmac_ul_tbf(struct gprs_rlcmac_bts *bts, GprsMs *ms);
~gprs_rlcmac_ul_tbf();
gprs_rlc_window *window();
- struct msgb *create_ul_ack(uint32_t fn, uint8_t ts);
- bool ctrl_ack_to_toggle();
- bool handle_ctrl_ack(enum pdch_ulc_tbf_poll_reason reason);
/* blocks were acked */
int rcv_data_block_acknowledged(
const struct gprs_rlc_data_info *rlc,
@@ -97,11 +103,12 @@ struct gprs_rlcmac_ul_tbf : public gprs_rlcmac_tbf {
int32_t m_rx_counter; /* count all received blocks */
uint8_t m_usf[8]; /* list USFs per PDCH (timeslot), initialized to USF_INVALID */
uint8_t m_contention_resolution_done; /* set after done */
- uint8_t m_final_ack_sent; /* set if we sent final ack */
struct rate_ctr_group *m_ul_gprs_ctrs;
struct rate_ctr_group *m_ul_egprs_ctrs;
+ struct tbf_ul_ass_fsm_ctx ul_ack_fsm;
+
protected:
void maybe_schedule_uplink_acknack(const gprs_rlc_data_info *rlc, bool countdown_finished);
@@ -138,6 +145,8 @@ void set_tbf_ta(struct gprs_rlcmac_ul_tbf *tbf, uint8_t ta);
struct gprs_rlcmac_ul_tbf *as_ul_tbf(struct gprs_rlcmac_tbf *tbf);
void tbf_usf_timeout(struct gprs_rlcmac_ul_tbf *tbf);
bool ul_tbf_contention_resolution_done(const struct gprs_rlcmac_ul_tbf *tbf);
+struct osmo_fsm_inst *tbf_ul_ack_fi(const struct gprs_rlcmac_ul_tbf *tbf);
+void ul_tbf_contention_resolution_success(struct gprs_rlcmac_ul_tbf *tbf);
#define LOGPTBFUL(tbf, level, fmt, args...) LOGP(DTBFUL, level, "%s " fmt, tbf_name(tbf), ## args)
#ifdef __cplusplus