From 610edac8015f2d98f07b4d2632ca53ad8e78bf7d Mon Sep 17 00:00:00 2001 From: Xavier Arteaga Date: Mon, 5 Feb 2018 12:59:06 +0100 Subject: [PATCH 1/2] Do not append RI in RM30 if no TM3/4 --- srsue/src/phy/phch_worker.cc | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/srsue/src/phy/phch_worker.cc b/srsue/src/phy/phch_worker.cc index 9caa0102a..61c767e7a 100644 --- a/srsue/src/phy/phch_worker.cc +++ b/srsue/src/phy/phch_worker.cc @@ -940,11 +940,16 @@ void phch_worker::set_uci_aperiodic_cqi() srslte_cqi_to_str(uci_data.uci_cqi, uci_data.uci_cqi_len, cqi_str, SRSLTE_CQI_STR_MAX_CHAR); /* Set RI = 1 */ - uci_data.uci_ri = ri; - uci_data.uci_ri_len = 1; + if (phy->config->dedicated.antenna_info_explicit_value.tx_mode == LIBLTE_RRC_TRANSMISSION_MODE_3 || + phy->config->dedicated.antenna_info_explicit_value.tx_mode == LIBLTE_RRC_TRANSMISSION_MODE_4) { + uci_data.uci_ri = ri; + uci_data.uci_ri_len = 1; + } else { + uci_data.uci_ri_len = 0; + } - Info("PUSCH: Aperiodic RM30 ri%s, CQI=%s, SNR=%.1f dB, for %d subbands\n", - (uci_data.uci_ri == 0)?"=1":"~1", cqi_str, phy->avg_snr_db, cqi_report.subband_hl.N); + Info("PUSCH: Aperiodic RM30 CQI=%s, SNR=%.1f dB, for %d subbands\n", + (uci_data.uci_ri_len)?((uci_data.uci_ri == 0)?"ri=0, ":"ri=1, "):"", cqi_str, phy->avg_snr_db, cqi_report.subband_hl.N); } break; case LIBLTE_RRC_CQI_REPORT_MODE_APERIODIC_RM31: From 4949759cdc8485f01db8deeb0f6e97e93bd1edef Mon Sep 17 00:00:00 2001 From: Xavier Arteaga Date: Tue, 6 Feb 2018 10:42:35 +0100 Subject: [PATCH 2/2] Fixed simultaneous PHICH (ACK) and CQI request. --- srsue/hdr/mac/ul_harq.h | 4 ++-- srsue/src/phy/phch_worker.cc | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/srsue/hdr/mac/ul_harq.h b/srsue/hdr/mac/ul_harq.h index 7418d23bf..b98a7497a 100644 --- a/srsue/hdr/mac/ul_harq.h +++ b/srsue/hdr/mac/ul_harq.h @@ -206,7 +206,7 @@ private: { if (ack) { if (grant) { - if (grant->ndi[0] == get_ndi()) { + if (grant->ndi[0] == get_ndi() && grant->phy_grant.ul.mcs.tbs != 0) { *ack = false; } } @@ -215,7 +215,7 @@ private: // Reset HARQ process if TB has changed if (harq_feedback && has_grant() && grant) { - if (grant->n_bytes[0] != cur_grant.n_bytes[0] && cur_grant.n_bytes[0] > 0) { + if (grant->n_bytes[0] != cur_grant.n_bytes[0] && cur_grant.n_bytes[0] > 0 && grant->n_bytes[0] > 0) { Debug("UL %d: Reset due to change of grant size last_grant=%d, new_grant=%d\n", pid, cur_grant.n_bytes[0], grant->n_bytes[0]); reset(); diff --git a/srsue/src/phy/phch_worker.cc b/srsue/src/phy/phch_worker.cc index 61c767e7a..720f0557e 100644 --- a/srsue/src/phy/phch_worker.cc +++ b/srsue/src/phy/phch_worker.cc @@ -931,7 +931,7 @@ void phch_worker::set_uci_aperiodic_cqi() int cqi_len = srslte_cqi_value_pack(&cqi_report, uci_data.uci_cqi); if (cqi_len < 0) { - Error("Error packing CQI value (Aperiodic reporting mode RM31)."); + Error("Error packing CQI value (Aperiodic reporting mode RM30)."); return; } uci_data.uci_cqi_len = (uint32_t) cqi_len; @@ -948,8 +948,8 @@ void phch_worker::set_uci_aperiodic_cqi() uci_data.uci_ri_len = 0; } - Info("PUSCH: Aperiodic RM30 CQI=%s, SNR=%.1f dB, for %d subbands\n", - (uci_data.uci_ri_len)?((uci_data.uci_ri == 0)?"ri=0, ":"ri=1, "):"", cqi_str, phy->avg_snr_db, cqi_report.subband_hl.N); + Info("PUSCH: Aperiodic RM30 CQI=%s, %sSNR=%.1f dB, for %d subbands\n", + cqi_str, (uci_data.uci_ri_len)?((uci_data.uci_ri == 0)?"ri=0, ":"ri=1, "):"", phy->avg_snr_db, cqi_report.subband_hl.N); } break; case LIBLTE_RRC_CQI_REPORT_MODE_APERIODIC_RM31: