From fecab500666b7913bee89fbf0427f37b571512f3 Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Wed, 17 Mar 2021 15:26:37 +0100 Subject: [PATCH] sysmo: fix wrong FN jumps in rx RA.ind There's no need for setting the FN in RA.ind since we anyway already receive a DATA.ind beforehand. Furthermore, the applied delay of 5 in the call is not really used at all. Change-Id: I437f4f95d054aea96bec3b9343e495451020ff3c --- src/bts.cpp | 2 +- src/bts.h | 2 +- src/osmo-bts-sysmo/sysmo_l1_if.c | 2 -- src/pcu_l1_if.cpp | 8 +------- src/pcu_l1_if.h | 1 - tests/tbf/TbfTest.cpp | 2 +- 6 files changed, 4 insertions(+), 13 deletions(-) diff --git a/src/bts.cpp b/src/bts.cpp index c1cee17b..dc4159c1 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -305,7 +305,7 @@ static inline int delta_fn(int fn, int to) return (fn + GSM_MAX_FN * 3 / 2 - to) % GSM_MAX_FN - GSM_MAX_FN/2; } -void bts_set_current_block_frame_number(struct gprs_rlcmac_bts *bts, int fn, unsigned max_delay) +void bts_set_current_block_frame_number(struct gprs_rlcmac_bts *bts, int fn) { int delay = 0; const int late_block_delay_thresh = 13; diff --git a/src/bts.h b/src/bts.h index 9336c894..ab8a973b 100644 --- a/src/bts.h +++ b/src/bts.h @@ -276,7 +276,7 @@ struct gprs_rlcmac_ul_tbf *bts_ul_tbf_by_tfi(struct gprs_rlcmac_bts *bts, uint8_ void bts_snd_dl_ass(struct gprs_rlcmac_bts *bts, struct gprs_rlcmac_tbf *tbf, bool poll, uint16_t pgroup); void bts_set_current_frame_number(struct gprs_rlcmac_bts *bts, uint32_t frame_number); -void bts_set_current_block_frame_number(struct gprs_rlcmac_bts *bts, int frame_number, unsigned max_delay); +void bts_set_current_block_frame_number(struct gprs_rlcmac_bts *bts, int frame_number); static inline uint32_t bts_current_frame_number(const struct gprs_rlcmac_bts *bts) { return bts->cur_fn; diff --git a/src/osmo-bts-sysmo/sysmo_l1_if.c b/src/osmo-bts-sysmo/sysmo_l1_if.c index eb869e11..29656d77 100644 --- a/src/osmo-bts-sysmo/sysmo_l1_if.c +++ b/src/osmo-bts-sysmo/sysmo_l1_if.c @@ -240,8 +240,6 @@ static int handle_ph_ra_ind(struct femtol1_hdl *fl1h, GsmL1_PhRaInd_t *ra_ind) struct gprs_rlcmac_bts *bts; bts = llist_first_entry_or_null(&the_pcu->bts_list, struct gprs_rlcmac_bts, list); - pcu_rx_ra_time(bts, ra_ind->u16Arfcn, ra_ind->u32Fn, ra_ind->u8Tn); - if (ra_ind->measParam.fLinkQuality < MIN_QUAL_RACH) return 0; diff --git a/src/pcu_l1_if.cpp b/src/pcu_l1_if.cpp index f28c46f8..0ccf642e 100644 --- a/src/pcu_l1_if.cpp +++ b/src/pcu_l1_if.cpp @@ -273,13 +273,7 @@ void pcu_l1if_tx_pch(struct gprs_rlcmac_bts *bts, bitvec * block, int plen, uint void pcu_rx_block_time(struct gprs_rlcmac_bts *bts, uint16_t arfcn, uint32_t fn, uint8_t ts_no) { - bts_set_current_block_frame_number(bts, fn, 0); -} - -void pcu_rx_ra_time(struct gprs_rlcmac_bts *bts, uint16_t arfcn, uint32_t fn, uint8_t ts_no) -{ - /* access bursts may arrive some bursts earlier */ - bts_set_current_block_frame_number(bts, fn, 5); + bts_set_current_block_frame_number(bts, fn); } int pcu_rx_data_ind_pdtch(struct gprs_rlcmac_bts *bts, struct gprs_rlcmac_pdch *pdch, uint8_t *data, diff --git a/src/pcu_l1_if.h b/src/pcu_l1_if.h index aff23f5d..246444ca 100644 --- a/src/pcu_l1_if.h +++ b/src/pcu_l1_if.h @@ -177,7 +177,6 @@ int pcu_rx_data_ind_pdtch(struct gprs_rlcmac_bts *bts, struct gprs_rlcmac_pdch * uint8_t len, uint32_t fn, struct pcu_l1_meas *meas); void pcu_rx_block_time(struct gprs_rlcmac_bts *bts, uint16_t arfcn, uint32_t fn, uint8_t ts_no); -void pcu_rx_ra_time(struct gprs_rlcmac_bts *bts, uint16_t arfcn, uint32_t fn, uint8_t ts_no); uint16_t imsi2paging_group(const char* imsi); #ifdef __cplusplus } diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp index 2986132c..46667b43 100644 --- a/tests/tbf/TbfTest.cpp +++ b/tests/tbf/TbfTest.cpp @@ -627,7 +627,7 @@ static gprs_rlcmac_ul_tbf *establish_ul_tbf_single_phase(struct gprs_rlcmac_bts static void send_ul_mac_block_buf(struct gprs_rlcmac_bts *bts, struct gprs_rlcmac_pdch *pdch, unsigned fn, uint8_t *buf, int num_bytes) { - bts_set_current_block_frame_number(bts, fn, 0); + bts_set_current_block_frame_number(bts, fn); pdch->rcv_block(buf, num_bytes, fn, &meas); pdch_ulc_expire_fn(pdch->ulc, fn); }