* INTC Contribution to the O-RAN F Release for O-DU Low
[o-du/phy.git] / fapi_5g / source / api / fapi2phy / p5 / nr5g_fapi_proc_add_remove_core_msg.c
index 5164423..ed0856a 100644 (file)
@@ -16,8 +16,8 @@
 *
 *******************************************************************************/
 
+#include "nr5g_mac_phy_api.h"
 #include "fapi_vendor_extension.h"
-#include "gnb_l1_l2_api.h"
 #include "nr5g_fapi_common_types.h"
 #include "nr5g_fapi_fapi2phy_api.h"
 #include "nr5g_fapi_log.h"
@@ -44,6 +44,7 @@ uint8_t nr5g_fapi_add_remove_core_message(
 {
     uint32_t i, k;
     PMAC2PHY_QUEUE_EL p_list_elem;
+    PADD_REMOVE_BBU_CORES_NR5G p_add_remove_bbu_cores_nr5g;
     PADD_REMOVE_BBU_CORES p_add_remove_bbu_cores;
 
     /* Below print is for better logging on console in debug mode. */
@@ -55,7 +56,7 @@ uint8_t nr5g_fapi_add_remove_core_message(
     }
 
     p_list_elem = nr5g_fapi_fapi2phy_create_api_list_elem(
-        (uint8_t)MSG_TYPE_PHY_ADD_REMOVE_CORE, 1, (uint32_t) sizeof(ADD_REMOVE_BBU_CORES));
+        (uint8_t)MSG_TYPE_PHY_ADD_REMOVE_CORE, 1, (uint32_t) sizeof(ADD_REMOVE_BBU_CORES_NR5G));
 
     if (!p_list_elem) {
         NR5G_FAPI_LOG(ERROR_LOG, ("[FAPI_VENDOR_EXT_ADD_REMOVE_CORE] Unable to create "
@@ -63,10 +64,11 @@ uint8_t nr5g_fapi_add_remove_core_message(
         return FAILURE;
     }
 
-    p_add_remove_bbu_cores = (PADD_REMOVE_BBU_CORES) (p_list_elem + 1);
-    p_add_remove_bbu_cores->sMsgHdr.nMessageType = MSG_TYPE_PHY_ADD_REMOVE_CORE;
-    p_add_remove_bbu_cores->sMsgHdr.nMessageLen = sizeof(ADD_REMOVE_BBU_CORES);
+    p_add_remove_bbu_cores_nr5g = (PADD_REMOVE_BBU_CORES_NR5G) (p_list_elem + 1);
+    p_add_remove_bbu_cores_nr5g->sMsgHdr.nMessageType = MSG_TYPE_PHY_ADD_REMOVE_CORE;
+    p_add_remove_bbu_cores_nr5g->sMsgHdr.nMessageLen = sizeof(ADD_REMOVE_BBU_CORES_NR5G);
 
+    p_add_remove_bbu_cores = &p_add_remove_bbu_cores_nr5g->sAddRemoveBbuCores;
     for (i = 0; i < FAPI_MAX_NUM_SET_CORE_MASK; ++i)
     {
         for (k = 0; k < FAPI_MAX_MASK_OPTIONS; ++k)
@@ -78,6 +80,11 @@ uint8_t nr5g_fapi_add_remove_core_message(
     {
         p_add_remove_bbu_cores->nMacOptions[i] = p_fapi_req->add_remove_core_info.nMacOptions[i];
     }
+    for(k = 0; k < FAPI_MAX_NUM_CELLS; ++k) {
+        for(i = 0; i < FAPI_MAX_GROUP_NUM; ++i) {
+            p_add_remove_bbu_cores->nPuschInterOptions[k][i] = p_fapi_req->add_remove_core_info.nPuschInterOptions[k][i];
+        }
+    }
     p_add_remove_bbu_cores->eOption = (BBUPOOL_CORE_OPERATION)p_fapi_req->add_remove_core_info.eOption;
 
     nr5g_fapi_fapi2phy_add_to_api_list(is_urllc, p_list_elem);