aboutsummaryrefslogtreecommitdiffstats
path: root/src/tbf.h
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2016-01-26 21:46:26 +0100
committerJacob Erlbeck <jerlbeck@sysmocom.de>2016-02-08 00:45:38 +0100
commitf2694b74c9af6e308d3886cd3c75864d101de8d4 (patch)
treee402695c1685b270713f563d240d348dd6a8136e /src/tbf.h
parent8eb17143f2b3ab5d96c46d698722de9dc83ac5f4 (diff)
tbf: Add check_polling/set_polling
Currently the checks for and the actual polling is done in several places by copy & paste of several lines of code. This hinders changes of they polling is handled internally and also is likely source of programming mistakes. Separate this into a check_polling function, that checks whether polling is possible and returns the FN and the RRBP to be used in that case. Otherwise the cause is logged (LOGL_DEBUG) and a negative error value is returned. There are no other side effect beside the logging. If the call is successful, the set_polling method can be used to actually register the polling. Extend the encoder functions' parameters lists by an rrbp parameter. Sponsored-by: On-Waves ehf
Diffstat (limited to 'src/tbf.h')
-rw-r--r--src/tbf.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/tbf.h b/src/tbf.h
index d23cf933..edb8280e 100644
--- a/src/tbf.h
+++ b/src/tbf.h
@@ -119,6 +119,9 @@ struct gprs_rlcmac_tbf {
void stop_t3191();
int establish_dl_tbf_on_pacch();
+ 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 poll_timeout();
/** tlli handling */