* INTC Contribution to the O-RAN F Release for O-DU Low
[o-du/phy.git] / fapi_5g / source / api / fapi2mac / p5 / nr5g_fapi_proc_ul_iq_samples_resp.c
index 94ebb4a..83479a5 100644 (file)
@@ -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,7 +22,6 @@
  *
  **/
 #include "nr5g_fapi_framework.h"
-#include "gnb_l1_l2_api.h"
 #include "nr5g_fapi_fapi2mac_api.h"
 #include "nr5g_fapi_fapi2mac_p5_proc.h"
 
@@ -40,7 +39,7 @@
 **/
 uint8_t nr5g_fapi_ul_iq_samples_response(
     p_nr5g_fapi_phy_ctx_t p_phy_ctx,
-    PADD_REMOVE_BBU_CORES p_iapi_resp)
+    PADD_REMOVE_BBU_CORES_NR5G p_iapi_resp)
 {
     uint8_t phy_id;
     fapi_vendor_ext_ul_iq_samples_res_t *p_fapi_resp;
@@ -54,21 +53,16 @@ uint8_t nr5g_fapi_ul_iq_samples_response(
     }
 
     if (NULL == p_iapi_resp) {
-        NR5G_FAPI_LOG(ERROR_LOG, ("[UL_IQ_SAMPLES.response] Invalid iapi "
+        NR5G_FAPI_LOG(ERROR_LOG, ("[UL_IQ_SAMPLES.response] Invalid IAPI "
                 "ULIQ_Samples response message"));
         return FAILURE;
     }
 
     phy_id = p_iapi_resp->sSFN_Slot.nCarrierIdx;
     p_phy_instance = &p_phy_ctx->phy_instance[phy_id];
-    if (p_phy_instance->phy_id != phy_id) {
-        NR5G_FAPI_LOG(ERROR_LOG, (" [UL_IQ_SAMPLES.response] Invalid "
-                "phy instance"));
-        return FAILURE;
-    }
     // Create FAPI message header
     if (p_phy_instance->state == FAPI_STATE_IDLE) {
-        nr5g_fapi_message_header_per_phy(phy_id);
+        nr5g_fapi_message_header_per_phy(phy_id, false);
     }
 
     p_list_elem =
@@ -86,9 +80,9 @@ uint8_t nr5g_fapi_ul_iq_samples_response(
         (uint16_t) sizeof(fapi_vendor_ext_ul_iq_samples_res_t);
 
     /* 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, false);
 
-    NR5G_FAPI_LOG(INFO_LOG, ("[UL_IQ_SAMPLES.response]%d]", phy_id));
+    NR5G_FAPI_LOG(INFO_LOG, ("[UL_IQ_SAMPLES.response][%d]", phy_id));
 
     return SUCCESS;
 }