pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/33138 )
Change subject: Use fn_valid() helper in pcu_rx_time_ind() ......................................................................
Use fn_valid() helper in pcu_rx_time_ind()
Change-Id: I5b1f1d4cd621d81fb99b87761a878af242227a10 --- M src/pcu_l1_if.cpp 1 file changed, 10 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/38/33138/1
diff --git a/src/pcu_l1_if.cpp b/src/pcu_l1_if.cpp index e675d86..3f881cf 100644 --- a/src/pcu_l1_if.cpp +++ b/src/pcu_l1_if.cpp @@ -1036,10 +1036,8 @@
static int pcu_rx_time_ind(struct gprs_rlcmac_bts *bts, struct gsm_pcu_if_time_ind *time_ind) { - uint8_t fn13 = time_ind->fn % 13; - /* omit frame numbers not starting at a MAC block */ - if (fn13 != 0 && fn13 != 4 && fn13 != 8) + if (!fn_valid(time_ind->fn)) return 0;
LOGP(DL1IF, LOGL_DEBUG, "Time indication received: %d\n", time_ind->fn % 52);