From 636d7fdb72c0c6674699c8520f7c6132d86b03bf Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Wed, 31 May 2023 20:28:49 +0200 Subject: bts: use RFN directly to calculate fn416 RFN_MODULUS (42432) used to calculate is a multiple of 416: 416 * 102 = 42432 Hence, (X % 42432) % 416 == X % 416. So, there's no need to derive the full FN. Change-Id: If7a6a15c373a068bcc757d27937dd6eeac2e0bae --- src/bts.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bts.cpp b/src/bts.cpp index 6cac93f5..640405f5 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -1058,7 +1058,7 @@ static uint32_t ptcch_slot_map[PTCCH_TAI_NUM] = { int bts_rcv_ptcch_rach(struct gprs_rlcmac_bts *bts, const struct rach_ind_params *rip) { - uint32_t fn416 = bts_rfn_to_fn(bts, rip->rfn) % 416; + uint16_t fn416 = rip->rfn % 416; struct gprs_rlcmac_pdch *pdch; uint8_t ss; -- cgit v1.2.3