+
+/**************************************************************************
+ * @brief Function to fill and send MacCellconfig
+ *
+ * @details
+ *
+ * Function : duBuildAndSendMacCellCfg
+ *
+ * Functionality:
+ * Initiates MAC Configs towards MAC
+ *
+ * @param[in] void
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ ***************************************************************************/
+S16 duBuildAndSendMacCellCfg()
+{
+ Pst pst;
+ DU_SET_ZERO(&pst, sizeof(Pst));
+ MacCellCfg *duMacCellCfg = NULLP;
+
+ DU_ALLOC(duMacCellCfg, sizeof(MacCellCfg));
+ if(duMacCellCfg == NULLP)
+ {
+ return RFAILED;
+ }
+
+ /* store the address in the duCb so that we can free on confirm msg */
+ duCb.duMacCellCfg = duMacCellCfg;
+
+ /* copy the mac config structure from duCfgParams */
+ memcpy(duMacCellCfg,&duCfgParam.macCellCfg,sizeof(MacCellCfg));
+
+ duMacCellCfg->transId = getTransId(); /* transaction ID */
+
+ /* Fill Pst */
+ pst.selector = DU_SELECTOR_LWLC;
+ pst.srcEnt = ENTDUAPP;
+ pst.dstEnt = ENTRG;
+ pst.dstInst = 0;
+ pst.srcInst = 0;
+ pst.dstProcId = DU_PROC;
+ pst.srcProcId = DU_PROC;
+ pst.region = duCb.init.region;
+ pst.event = EVENT_MAC_CELL_CONFIG_REQ;
+
+ /* Send MAC cell config to MAC */
+ return (*packMacCellCfgOpts[pst.selector])(&pst, duMacCellCfg);
+}
+
+/**************************************************************************
+ * @brief Function to Handle MAC cell config confirm
+ *
+ * @details
+ *
+ * Function : duHandleMacCellCfgCfm
+ *
+ * Functionality:
+ * Initiates general Configs towards MAC
+ *
+ * @param[in] void
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ ***************************************************************************/
+S16 duHandleMacCellCfgCfm(MacCellCfgCfm *macCellCfgCfm)
+{
+ S16 ret = ROK;
+
+ if(macCellCfgCfm->transId == duCb.duMacCellCfg->transId)
+ {
+ /* free the memory allocated during sending macCellCfg request */
+ DU_FREE(duCb.duMacCellCfg,sizeof(MacCellCfg));
+ duCb.duMacCellCfg = NULLP;
+
+ /* Build and send GNB-DU config update */
+ ret = BuildAndSendDUConfigUpdate();
+ }
+ else
+ {
+ /* transaction ID missmatch */
+ DU_LOG("\n transaction ID mismatch in macCellCfg");
+ ret = RFAILED;
+ }
+
+ return ret;
+}
+