fixeria has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/31641 ) ( 1 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: rlcmac/sched: use TDMA Fn macros from libosmogsm ...................................................................... rlcmac/sched: use TDMA Fn macros from libosmogsm Change-Id: I536a0d2ae9b5dabcd3976f5aeb15069bd03e6aa9 --- M src/rlcmac/sched.c 1 file changed, 12 insertions(+), 7 deletions(-) Approvals: pespin: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/rlcmac/sched.c b/src/rlcmac/sched.c index b5c02cc..c2b981f 100644 --- a/src/rlcmac/sched.c +++ b/src/rlcmac/sched.c @@ -21,6 +21,7 @@ #include <osmocom/core/linuxlist.h> #include <osmocom/core/msgb.h> +#include <osmocom/gsm/gsm0502.h> #include <osmocom/gprs/rlcmac/rlcmac_private.h> #include <osmocom/gprs/rlcmac/sched.h> @@ -39,11 +40,6 @@ struct gprs_rlcmac_ul_tbf *ul_ass; }; -static inline uint32_t next_fn(uint32_t fn, uint32_t offset) -{ - return (fn + offset) % GSM_MAX_FN; -} - static inline bool fn_valid(uint32_t fn) { uint32_t f = fn % 13; @@ -62,10 +58,10 @@ OSMO_ASSERT(rrbp < ARRAY_SIZE(rrbp_list)); - poll_fn = next_fn(cur_fn, rrbp_list[rrbp]); + poll_fn = GSM_TDMA_FN_SUM(cur_fn, rrbp_list[rrbp]); if (!fn_valid(poll_fn)) { /* 17 -> 18, 21 -> 22: */ - poll_fn = next_fn(poll_fn, 1); + GSM_TDMA_FN_INC(poll_fn); OSMO_ASSERT(fn_valid(poll_fn)); } return poll_fn; -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/31641 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: I536a0d2ae9b5dabcd3976f5aeb15069bd03e6aa9 Gerrit-Change-Number: 31641 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria <vyanitskiy@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de> Gerrit-Reviewer: pespin <pespin@sysmocom.de> Gerrit-MessageType: merged