From 9b7364a3ca6caf3ecbfb4284e9eb254f69076fd0 Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Wed, 7 Feb 2018 12:30:00 +0100 Subject: [PATCH 1/2] minor: fix AssertFatal --- openair2/LAYER2/MAC/eNB_scheduler_primitives.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair2/LAYER2/MAC/eNB_scheduler_primitives.c b/openair2/LAYER2/MAC/eNB_scheduler_primitives.c index 3e574a56c3..e0e0f0a5fa 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_primitives.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_primitives.c @@ -3716,7 +3716,7 @@ extract_harq(module_id_t mod_idP, int CC_idP, int UE_id, sched_ctl->round[CC_idP][harq_pid]++; // increment round } else { // one or two ACK/NAK bits - AssertFatal(num_ack_nak > 2, + AssertFatal(num_ack_nak <= 2, "num_ack_nak %d > 2 for 1 CC and TM3/4/8/9/10\n", num_ack_nak); if ((num_ack_nak == 2) From c0bcd786735c26ef6dbd5c8e381a307ca3d49194 Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Wed, 7 Feb 2018 12:31:26 +0100 Subject: [PATCH 2/2] bugfix: don't take into account report CQI in case of NACK or DTX The problem that may happen is that when the UE does not transmit on PUCCH (for whatever reason) we may get no signal at all, and thus compute a very low CQI. Later on we may ask the UE to transmit louder which may lead to saturation and more problems. The solution is simple: don't care about CQI in case of DTX (and NACK also, as done for PUSCH). Only FDD case done. For TDD it seems that: - nfapi structures are not correct. See nfapi_harq_indication_tdd_rel13_t in nfapi/open-nFAPI/nfapi/public_inc/nfapi_interface.h, all the cases (bundling, multiplex, ...) use nfapi_harq_indication_tdd_harq_data_t - the function extract_harq does not handle TDD --- .../LAYER2/MAC/eNB_scheduler_primitives.c | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/openair2/LAYER2/MAC/eNB_scheduler_primitives.c b/openair2/LAYER2/MAC/eNB_scheduler_primitives.c index e0e0f0a5fa..867b6d7e8b 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_primitives.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_primitives.c @@ -4472,6 +4472,24 @@ UL_failure_indication(module_id_t mod_idP, int cc_idP, frame_t frameP, } } +static int nack_or_dtx_reported( + COMMON_channels_t *cc, + nfapi_harq_indication_pdu_t *harq_pdu) +{ + int i; + + if (cc->tdd_Config) { + AssertFatal(0==1, "TDD to be done. FAPI structures (see nfapi_harq_indication_tdd_rel13_t) are not clean. To be cleaned as well?\n"); + abort(); + } else { + nfapi_harq_indication_fdd_rel13_t *hi = &harq_pdu->harq_indication_fdd_rel13; + for (i = 0; i < hi->number_of_ack_nack; hi++) + if (hi->harq_tb_n[i] != 1) + return 1; + return 0; + } +} + void harq_indication(module_id_t mod_idP, int CC_idP, frame_t frameP, sub_frame_t subframeP, @@ -4500,7 +4518,8 @@ harq_indication(module_id_t mod_idP, int CC_idP, frame_t frameP, extract_harq(mod_idP, CC_idP, UE_id, frameP, subframeP, (void *) &harq_pdu->harq_indication_fdd_rel13, channel); - if (channel == 0) { + /* don't care about cqi reporting if NACK/DTX is there */ + if (channel == 0 && !nack_or_dtx_reported(cc, harq_pdu)) { sched_ctl->pucch1_snr[CC_idP] = ul_cqi; sched_ctl->pucch1_cqi_update[CC_idP] = 1; }