fixeria has submitted this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/34522?usp=email )

Change subject: l1gprs: migrate to gsm0502_fncmp() from libosmogsm
......................................................................

l1gprs: migrate to gsm0502_fncmp() from libosmogsm

Change-Id: I10261aa114b5dce3efee26ea84a1caa50c49a1d2
Depends: libosmocore.git I9590f2e836fc48650decf1564b6ab46306c4fe2d
Depends: libosmocore.git Ie8bb9c49c6f81b8f4a1766547d6943f9880d1186
Related: OS#5500
---
M src/shared/l1gprs.c
1 file changed, 13 insertions(+), 14 deletions(-)

Approvals:
  Jenkins Builder: Verified
  fixeria: Looks good to me, approved




diff --git a/src/shared/l1gprs.c b/src/shared/l1gprs.c
index bfbda59..3294a42 100644
--- a/src/shared/l1gprs.c
+++ b/src/shared/l1gprs.c
@@ -344,19 +344,6 @@
                  LOG_TBF_ARGS(preq), preq->start_fn);
 }

-/* Check if the current TDMA Fn is past the start TDMA Fn.
- * Based on fn_cmp() implementation from osmo-pcu.git, simplified. */
-static bool l1gprs_check_fn(uint32_t current, uint32_t start)
-{
-       const uint32_t thresh = GSM_TDMA_HYPERFRAME / 2;
-
-       if ((current < start && (start - current) < thresh) ||
-           (current > start && (current - start) > thresh))
-               return false;
-
-       return true;
-}
-
 /* Check the list of pending TBFs and move those with expired Fn to the active 
list */
 static void l1gprs_check_pending_tbfs(struct l1gprs_state *gprs, uint32_t fn)
 {
@@ -364,7 +351,7 @@
        struct l1gprs_tbf *tbf;

        llist_for_each_entry_safe(preq, tmp, &gprs->tbf_list_pending, list) {
-               if (!l1gprs_check_fn(fn, preq->start_fn))
+               if (gsm0502_fncmp(fn, preq->start_fn) < 0)
                        continue;

                LOGP_GPRS(gprs, LOGL_INFO,

--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/34522?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I10261aa114b5dce3efee26ea84a1caa50c49a1d2
Gerrit-Change-Number: 34522
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <vyanits...@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanits...@sysmocom.de>
Gerrit-Reviewer: laforge <lafo...@osmocom.org>
Gerrit-MessageType: merged

Reply via email to