X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?p=o-du%2Fphy.git;a=blobdiff_plain;f=fapi_5g%2Fsource%2Fapi%2Ffapi2mac%2Fp7%2Fnr5g_fapi_proc_rx_data_ind.c;fp=fapi_5g%2Fsource%2Fapi%2Ffapi2mac%2Fp7%2Fnr5g_fapi_proc_rx_data_ind.c;h=b4a43e7c38cdd7a1ff30879da6b08f5ef3ac8087;hp=3a1183a602a4bdb10964871b9a87b417ab1ca0dc;hb=892daba4c616407f16506415d5a69549519ef11d;hpb=76b4495d593ccf45d712db1a3ec96fa9d2d8f5f5 diff --git a/fapi_5g/source/api/fapi2mac/p7/nr5g_fapi_proc_rx_data_ind.c b/fapi_5g/source/api/fapi2mac/p7/nr5g_fapi_proc_rx_data_ind.c index 3a1183a..b4a43e7 100644 --- a/fapi_5g/source/api/fapi2mac/p7/nr5g_fapi_proc_rx_data_ind.c +++ b/fapi_5g/source/api/fapi2mac/p7/nr5g_fapi_proc_rx_data_ind.c @@ -1,6 +1,6 @@ /****************************************************************************** * -* Copyright (c) 2019 Intel. +* Copyright (c) 2021 Intel. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,8 +22,8 @@ * **/ +#include "nr5g_mac_phy_api.h" #include "nr5g_fapi_framework.h" -#include "gnb_l1_l2_api.h" #include "nr5g_fapi_fapi2mac_api.h" #include "nr5g_fapi_fapi2mac_p7_proc.h" #include "nr5g_fapi_fapi2mac_p7_pvt_proc.h" @@ -213,15 +213,14 @@ uint8_t nr5g_fapi_rx_data_indication_to_fapi_translation( p_fapi_pdu_ind_info->handle = p_pusch_info->handle; p_fapi_pdu_ind_info->rnti = p_rx_ulsch_pdu_data->nRNTI; - p_fapi_pdu_ind_info->harqId = p_pusch_info->harq_process_id; + // upper nibble of pdu_length is passed in upper nibble in harqId (which only takes up to 4 bits) + // this way, pdu_length has 20-bits (up to 1048576) + p_fapi_pdu_ind_info->harqId = ((p_rx_ulsch_pdu_data->nPduLen & 0x000F0000) >> 12) | (p_pusch_info->harq_process_id & 0x0F); p_fapi_pdu_ind_info->ul_cqi = p_pusch_info->ul_cqi; p_fapi_pdu_ind_info->timingAdvance = p_pusch_info->timing_advance; p_fapi_pdu_ind_info->rssi = 880; - p_fapi_pdu_ind_info->pdu_length = p_rx_ulsch_pdu_data->nPduLen; - if (p_fapi_pdu_ind_info->pdu_length > 0) - { + p_fapi_pdu_ind_info->pdu_length = 0xFFFF & p_rx_ulsch_pdu_data->nPduLen; p_fapi_pdu_ind_info->pduData = (void *)p_rx_ulsch_pdu_data->pPayload; - } p_stats->fapi_stats.fapi_rx_data_ind_pdus++; }