diff --git a/openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c b/openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c index 111f507fea..b3d6ed92c7 100644 --- a/openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c +++ b/openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c @@ -1257,9 +1257,9 @@ uint8_t get_pmi(uint8_t N_RB_DL,LTE_DL_eNB_HARQ_t *dlsch_harq,uint16_t rb) // printf("Getting pmi for RB %d => %d\n",rb,(pmi_alloc>>((rb>>2)<<1))&3); switch (N_RB_DL) { case 6: // 1 PRB per subband - if (mode <= PUSCH_PRECODING1) + if (mode <= PUSCH_PRECODING1) //single layer return((pmi_alloc>>(rb<<1))&3); - else + else //two layer return((pmi_alloc>>rb)&1); break; diff --git a/openair1/PHY/LTE_TRANSPORT/uci_tools.c b/openair1/PHY/LTE_TRANSPORT/uci_tools.c index 1cccc4aaac..9719a8f3c1 100644 --- a/openair1/PHY/LTE_TRANSPORT/uci_tools.c +++ b/openair1/PHY/LTE_TRANSPORT/uci_tools.c @@ -285,6 +285,10 @@ void extract_CQI(void *o,UCI_format_t uci_format,LTE_eNB_UE_stats *stats, uint8_ stats->DL_cqi[1] = 24; stats->DL_pmi_dual = ((wideband_cqi_rank2_2A_5MHz *)o)->pmi; + //this translates the 2-layer PMI into a single layer PMI for the first codeword + //the PMI for the second codeword will be stats->DL_pmi_single^0x1555 + for (i=0;i<7;i++) + stats->DL_pmi_single&(1<<(2*i)) = (stats->DL_pmi_dual&(1