From f60cf62f4fca3ee0f3803ecc0b7e87b35d74d9f3 Mon Sep 17 00:00:00 2001 From: Max Date: Mon, 10 Jul 2017 14:40:09 +0200 Subject: Simplify polling troubleshooting * introduce enum describing poll kind and use it in set_polling() * move state change into set_polling() * move logging into set_polling() and unify output * move duplicated code into static function * adjust tests to match unified logging output Change-Id: I14074207f8bbc18b3ebd60875bb99a0a3a4b399d Related: OS#1524 --- src/tbf.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/tbf.h') diff --git a/src/tbf.h b/src/tbf.h index 9cc70e6e..95e1e892 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -54,6 +54,13 @@ enum gprs_rlcmac_tbf_state { GPRS_RLCMAC_RELEASING, /* releasing, wait to free TBI/USF */ }; +enum gprs_rlcmac_tbf_poll_type { + GPRS_RLCMAC_POLL_UL_ASS, + GPRS_RLCMAC_POLL_DL_ASS, + GPRS_RLCMAC_POLL_UL_ACK, + GPRS_RLCMAC_POLL_DL_ACK, +}; + enum gprs_rlcmac_tbf_poll_state { GPRS_RLCMAC_POLL_NONE = 0, GPRS_RLCMAC_POLL_SCHED, /* a polling was scheduled */ @@ -173,7 +180,7 @@ struct gprs_rlcmac_tbf { int check_polling(uint32_t fn, uint8_t ts, uint32_t *poll_fn, unsigned int *rrbp); - void set_polling(uint32_t poll_fn, uint8_t ts); + void set_polling(uint32_t poll_fn, uint8_t ts, enum gprs_rlcmac_tbf_poll_type t); void poll_timeout(); /** tlli handling */ -- cgit v1.2.3