mac: remove unused rwlock and unused cqi counter

Signed-off-by: Carlo Galiotto <carlo@srs.io>
master
Carlo Galiotto 3 years ago committed by carlo-gal
parent f53e01cfa3
commit 1a52cdcdaa

@ -84,7 +84,6 @@ private:
std::atomic<bool> active_state{true}; std::atomic<bool> active_state{true};
uint32_t phr_counter = 0; uint32_t phr_counter = 0;
uint32_t dl_cqi_counter = 0;
uint32_t dl_cqi_valid_counter = 0; uint32_t dl_cqi_valid_counter = 0;
uint32_t dl_ri_counter = 0; uint32_t dl_ri_counter = 0;
uint32_t dl_pmi_counter = 0; uint32_t dl_pmi_counter = 0;

@ -367,7 +367,6 @@ bool mac_nr::handle_uci_data(const uint16_t rnti, const srsran_uci_cfg_nr_t& cfg
} }
// Process CQI // Process CQI
srsran::rwlock_read_guard rw_lock(rwmutex);
ue_db[rnti]->metrics_dl_cqi(cfg_, value.csi->wideband_cri_ri_pmi_cqi.cqi, value.valid); ue_db[rnti]->metrics_dl_cqi(cfg_, value.csi->wideband_cri_ri_pmi_cqi.cqi, value.valid);
return true; return true;

@ -190,7 +190,7 @@ void ue_nr::metrics_read(mac_ue_metrics_t* metrics_)
*metrics_ = ue_metrics; *metrics_ = ue_metrics;
phr_counter = 0; phr_counter = 0;
dl_cqi_counter = 0; dl_cqi_valid_counter = 0;
ue_metrics = {}; ue_metrics = {};
} }
@ -200,9 +200,6 @@ void ue_nr::metrics_dl_cqi(const srsran_uci_cfg_nr_t& cfg_, uint32_t dl_cqi, boo
// Process CQI // Process CQI
for (uint32_t i = 0; i < cfg_.nof_csi; i++) { for (uint32_t i = 0; i < cfg_.nof_csi; i++) {
// Increment CQI opportunity
dl_cqi_counter++;
// Skip if invalid or not supported CSI report // Skip if invalid or not supported CSI report
if (not valid_cqi or cfg_.csi[i].cfg.quantity != SRSRAN_CSI_REPORT_QUANTITY_CRI_RI_PMI_CQI or if (not valid_cqi or cfg_.csi[i].cfg.quantity != SRSRAN_CSI_REPORT_QUANTITY_CRI_RI_PMI_CQI or
cfg_.csi[i].cfg.freq_cfg != SRSRAN_CSI_REPORT_FREQ_WIDEBAND) { cfg_.csi[i].cfg.freq_cfg != SRSRAN_CSI_REPORT_FREQ_WIDEBAND) {
@ -210,7 +207,7 @@ void ue_nr::metrics_dl_cqi(const srsran_uci_cfg_nr_t& cfg_, uint32_t dl_cqi, boo
} }
// Add statistics // Add statistics
ue_metrics.dl_cqi = SRSRAN_VEC_SAFE_CMA(dl_cqi, ue_metrics.dl_cqi, dl_cqi_counter); ue_metrics.dl_cqi = SRSRAN_VEC_SAFE_CMA(dl_cqi, ue_metrics.dl_cqi, dl_cqi_valid_counter);
dl_cqi_valid_counter++; dl_cqi_valid_counter++;
} }
} }

Loading…
Cancel
Save