diff --git a/lib/include/srslte/interfaces/sched_interface.h b/lib/include/srslte/interfaces/sched_interface.h index 318a61dd6..30cfc080f 100644 --- a/lib/include/srslte/interfaces/sched_interface.h +++ b/lib/include/srslte/interfaces/sched_interface.h @@ -286,7 +286,7 @@ public: virtual int ul_crc_info(uint32_t tti, uint16_t rnti, uint32_t enb_cc_idx, bool crc) = 0; virtual int ul_sr_info(uint32_t tti, uint16_t rnti) = 0; virtual int ul_bsr(uint16_t rnti, uint32_t lcg_id, uint32_t bsr) = 0; - virtual int ul_phr(uint16_t rnti, uint32_t enb_cc_idx, int phr) = 0; + virtual int ul_phr(uint16_t rnti, int phr) = 0; virtual int ul_snr_info(uint32_t tti, uint16_t rnti, uint32_t enb_cc_idx, float snr, uint32_t ul_ch_code) = 0; /* Run Scheduler for this tti */ diff --git a/srsenb/hdr/stack/mac/sched.h b/srsenb/hdr/stack/mac/sched.h index 0037e8360..903abdc7e 100644 --- a/srsenb/hdr/stack/mac/sched.h +++ b/srsenb/hdr/stack/mac/sched.h @@ -88,7 +88,7 @@ public: int ul_crc_info(uint32_t tti, uint16_t rnti, uint32_t enb_cc_idx, bool crc) final; int ul_sr_info(uint32_t tti, uint16_t rnti) override; int ul_bsr(uint16_t rnti, uint32_t lcg_id, uint32_t bsr) final; - int ul_phr(uint16_t rnti, uint32_t enb_cc_idx, int phr) final; + int ul_phr(uint16_t rnti, int phr) final; int ul_snr_info(uint32_t tti, uint16_t rnti, uint32_t enb_cc_idx, float snr, uint32_t ul_ch_code) final; int dl_sched(uint32_t tti, uint32_t enb_cc_idx, dl_sched_res_t& sched_result) final; diff --git a/srsenb/hdr/stack/mac/sched_ue.h b/srsenb/hdr/stack/mac/sched_ue.h index 9a65b89d6..242ed63c9 100644 --- a/srsenb/hdr/stack/mac/sched_ue.h +++ b/srsenb/hdr/stack/mac/sched_ue.h @@ -117,7 +117,7 @@ public: void dl_buffer_state(uint8_t lc_id, uint32_t tx_queue, uint32_t retx_queue); void ul_buffer_state(uint8_t lcg_id, uint32_t bsr); - void ul_phr(uint32_t enb_cc_idx, int phr); + void ul_phr(int phr); void mac_buffer_state(uint32_t ce_code, uint32_t nof_cmds); void set_ul_snr(tti_point tti_rx, uint32_t enb_cc_idx, float snr, uint32_t ul_ch_code); diff --git a/srsenb/src/stack/mac/sched.cc b/srsenb/src/stack/mac/sched.cc index 8aa58b297..ba5dcd638 100644 --- a/srsenb/src/stack/mac/sched.cc +++ b/srsenb/src/stack/mac/sched.cc @@ -328,10 +328,10 @@ int sched::ul_buffer_add(uint16_t rnti, uint32_t lcid, uint32_t bytes) return ue_db_access(rnti, [lcid, bytes](sched_ue& ue) { ue.ul_buffer_add(lcid, bytes); }); } -int sched::ul_phr(uint16_t rnti, uint32_t enb_cc_idx, int phr) +int sched::ul_phr(uint16_t rnti, int phr) { return ue_db_access( - rnti, [enb_cc_idx, phr](sched_ue& ue) { ue.ul_phr(enb_cc_idx, phr); }, __PRETTY_FUNCTION__); + rnti, [phr](sched_ue& ue) { ue.ul_phr(phr); }, __PRETTY_FUNCTION__); } int sched::ul_sr_info(uint32_t tti, uint16_t rnti) diff --git a/srsenb/src/stack/mac/sched_ue.cc b/srsenb/src/stack/mac/sched_ue.cc index cbaa77725..490cf79f7 100644 --- a/srsenb/src/stack/mac/sched_ue.cc +++ b/srsenb/src/stack/mac/sched_ue.cc @@ -298,9 +298,9 @@ void sched_ue::ul_buffer_add(uint8_t lcid, uint32_t bytes) lch_handler.ul_buffer_add(lcid, bytes); } -void sched_ue::ul_phr(uint32_t enb_cc_idx, int phr) +void sched_ue::ul_phr(int phr) { - carriers[enb_ue_cc_idx_map[enb_cc_idx]].tpc_fsm.set_phr(phr); + carriers[0].tpc_fsm.set_phr(phr); } void sched_ue::dl_buffer_state(uint8_t lc_id, uint32_t tx_queue, uint32_t retx_queue) diff --git a/srsenb/src/stack/mac/ue.cc b/srsenb/src/stack/mac/ue.cc index 473bf0d57..7ece3521b 100644 --- a/srsenb/src/stack/mac/ue.cc +++ b/srsenb/src/stack/mac/ue.cc @@ -347,8 +347,7 @@ bool ue::process_ce(srslte::sch_subh* subh) switch (subh->ul_sch_ce_type()) { case srslte::ul_sch_lcid::PHR_REPORT: phr = subh->get_phr(); - // TODO: Add enb_cc_idx - sched->ul_phr(rnti, 0, (int)phr); + sched->ul_phr(rnti, (int)phr); metrics_phr(phr); break; case srslte::ul_sch_lcid::CRNTI: