X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=fapi_5g%2Fsource%2Fapi%2Ffapi2mac%2Fp7%2Fnr5g_fapi_proc_slot_ind.c;h=fee2d5de4ce3fbe3b740abb7fd773bf0d336ee91;hb=892daba4c616407f16506415d5a69549519ef11d;hp=61bbdb77844354ab56c486256ae337a72268061c;hpb=70d9d920dd4e575f085f1f1a9050fefd1c10e127;p=o-du%2Fphy.git diff --git a/fapi_5g/source/api/fapi2mac/p7/nr5g_fapi_proc_slot_ind.c b/fapi_5g/source/api/fapi2mac/p7/nr5g_fapi_proc_slot_ind.c index 61bbdb7..fee2d5d 100644 --- a/fapi_5g/source/api/fapi2mac/p7/nr5g_fapi_proc_slot_ind.c +++ b/fapi_5g/source/api/fapi2mac/p7/nr5g_fapi_proc_slot_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" @@ -39,7 +39,9 @@ * **/ uint8_t nr5g_fapi_slot_indication( + bool is_urllc, p_nr5g_fapi_phy_ctx_t p_phy_ctx, + p_fapi_api_stored_vendor_queue_elems vendor_extension_elems, PSlotIndicationStruct p_iapi_resp) { uint8_t phy_id; @@ -76,6 +78,7 @@ uint8_t nr5g_fapi_slot_indication( p_list_elem = nr5g_fapi_fapi2mac_create_api_list_elem(FAPI_SLOT_INDICATION, 1, sizeof(fapi_slot_ind_t)); + if (!p_list_elem) { NR5G_FAPI_LOG(ERROR_LOG, ("[SLOT.indication] Unable to create " "list element. Out of memory!!!")); @@ -88,13 +91,23 @@ uint8_t nr5g_fapi_slot_indication( p_fapi_slot_ind->sfn = p_iapi_resp->sSFN_Slot.nSFN; p_fapi_slot_ind->slot = p_iapi_resp->sSFN_Slot.nSlot; + fapi_vendor_p7_ind_msg_t* p_fapi_vend_p7 = + nr5g_fapi_proc_vendor_p7_msg_get(vendor_extension_elems, phy_id); + fapi_vendor_ext_slot_ind_t* p_fapi_vend_slot_ind = p_fapi_vend_p7 ? &p_fapi_vend_p7->slot_ind : NULL; + + if (p_fapi_vend_slot_ind) { + p_fapi_vend_slot_ind->carrier_idx = p_iapi_resp->sSFN_Slot.nCarrierIdx; + p_fapi_vend_slot_ind->sym = p_iapi_resp->sSFN_Slot.nSym; + } + /* Add element to send list */ - nr5g_fapi_fapi2mac_add_api_to_list(phy_id, p_list_elem); + nr5g_fapi_fapi2mac_add_api_to_list(phy_id, p_list_elem, is_urllc); p_stats->fapi_stats.fapi_slot_ind++; - NR5G_FAPI_LOG(DEBUG_LOG, ("[SLOT.indication][%d][%d,%d]", + NR5G_FAPI_LOG(DEBUG_LOG, ("[SLOT.indication][%u][%u,%u,%u] is_urllc %u", p_phy_instance->phy_id, - p_iapi_resp->sSFN_Slot.nSFN, p_iapi_resp->sSFN_Slot.nSlot)); + p_iapi_resp->sSFN_Slot.nSFN, p_iapi_resp->sSFN_Slot.nSlot, + p_iapi_resp->sSFN_Slot.nSym, is_urllc)); } } return SUCCESS;