1 /*******************************************************************************
2 ################################################################################
3 # Copyright (c) [2017-2019] [Radisys] #
5 # Licensed under the Apache License, Version 2.0 (the "License"); #
6 # you may not use this file except in compliance with the License. #
7 # You may obtain a copy of the License at #
9 # http://www.apache.org/licenses/LICENSE-2.0 #
11 # Unless required by applicable law or agreed to in writing, software #
12 # distributed under the License is distributed on an "AS IS" BASIS, #
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
14 # See the License for the specific language governing permissions and #
15 # limitations under the License. #
16 ################################################################################
17 *******************************************************************************/
19 /* This file contains message handling functionality for DU APP */
23 #include "du_f1ap_msg_hdl.h"
24 #include "du_ue_mgr.h"
27 #include "lphy_stub.h"
36 extern DuCfgParams duCfgParam;
37 extern S16 cmPkLkwCfgReq(Pst *pst, KwMngmt *cfg);
38 extern S16 cmPkLkwCntrlReq(Pst *pst, KwMngmt *cfg);
39 extern S16 cmPkLrgCfgReq(Pst *pst, RgMngmt *cfg);
40 extern S16 BuildAndSendE2SetupReq();
41 extern S16 egtpHdlDatInd(EgtpMsg egtpMsg);
42 extern uint8_t BuildAndSendDUConfigUpdate();
43 extern U16 getTransId();
44 extern S16 cmPkLrgSchCfgReq(Pst * pst,RgMngmt * cfg);
46 packMacCellCfgReq packMacCellCfgOpts[] =
48 packMacCellCfg, /* packing for loosely coupled */
49 MacHdlCellCfgReq, /* packing for tightly coupled */
50 packMacCellCfg, /* packing for light weight loosly coupled */
53 DuMacCellStartReq packMacCellStartReqOpts[] =
55 packMacCellStartReq, /* Loose coupling */
56 MacHdlCellStartReq, /* TIght coupling */
57 packMacCellStartReq /* Light weight-loose coupling */
60 DuMacCellStopReq packMacCellStopReqOpts[] =
62 packMacCellStopReq, /* Loose coupling */
63 MacHdlCellStopReq, /* TIght coupling */
64 packMacCellStopReq /* Light weight-loose coupling */
67 /**************************************************************************
68 * @brief Function to fill configs required by RLC
72 * Function : duBuildRlcCfg
75 * Initiates general Configs towards RLC
77 * @param[in] Inst Specifies if RLC UL or RLC DL instance
78 * @return ROK - success
81 ***************************************************************************/
82 S16 duBuildRlcCfg(Inst inst)
85 KwGenCfg *genCfg = NULLP;
88 DU_SET_ZERO(&kwMngmt, sizeof(KwMngmt));
89 DU_SET_ZERO(&pst, sizeof(Pst));
91 genCfg = &(kwMngmt.t.cfg.s.gen);
93 /*----------- Fill General Configuration Parameters ---------*/
94 genCfg->maxUe = duCfgParam.maxUe;
95 genCfg->maxKwuSaps = 2;
96 genCfg->maxUdxSaps = 1;
97 genCfg->rlcMode = (inst == RLC_UL_INST) ?
98 LKW_RLC_MODE_UL : LKW_RLC_MODE_DL;
100 genCfg->maxRguSaps = DEFAULT_CELLS;
102 /*----------- Fill lmPst
103 * Parameters ---------*/
104 genCfg->lmPst.dstProcId = DU_PROC;
105 genCfg->lmPst.srcProcId = DU_PROC;
106 genCfg->lmPst.dstEnt = ENTDUAPP;
107 genCfg->lmPst.dstInst = DU_INST;
108 genCfg->lmPst.srcEnt = ENTKW;
109 genCfg->lmPst.srcInst = inst;
110 genCfg->lmPst.prior = PRIOR0;
111 genCfg->lmPst.route = RTESPEC;
112 genCfg->lmPst.region = (inst == RLC_UL_INST) ?
113 RLC_UL_MEM_REGION:RLC_DL_MEM_REGION;
114 genCfg->lmPst.pool = RLC_POOL;
115 genCfg->lmPst.selector = DU_SELECTOR_LC;
118 kwMngmt.hdr.msgType = TCFG;
119 kwMngmt.hdr.msgLen = 0;
120 kwMngmt.hdr.entId.ent = ENTKW;
121 kwMngmt.hdr.entId.inst = (Inst)0;
122 kwMngmt.hdr.elmId.elmnt = STGEN;
123 kwMngmt.hdr.seqNmb = 0;
124 kwMngmt.hdr.version = 0;
125 kwMngmt.hdr.transId = 0;
126 kwMngmt.hdr.response.prior = PRIOR0;
127 kwMngmt.hdr.response.route = RTESPEC;
128 kwMngmt.hdr.response.mem.region = (inst == RLC_UL_INST) ?
129 RLC_UL_MEM_REGION:RLC_DL_MEM_REGION;
130 kwMngmt.hdr.response.mem.pool = DU_POOL;
131 kwMngmt.hdr.response.selector = DU_SELECTOR_LC;
134 pst.selector = DU_SELECTOR_LC;
135 pst.srcEnt = ENTDUAPP;
138 pst.dstProcId = DU_PROC;
139 pst.srcProcId = DU_PROC;
140 pst.region = duCb.init.region;
142 DU_LOG("\nDU_APP : RLC Gen Cfg Req sent for inst %d", inst);
144 /* Send the request to RLC */
145 cmPkLkwCfgReq(&pst, &kwMngmt);
150 /**************************************************************************
151 * @brief Function to fill configs required by RLC
155 * Function : duBuildRlcLsapCfg
158 * Initiates general Configs towards RLC
160 * @param[in] Inst Specifies if RLC UL or RLC DL instance
161 * @return ROK - success
164 ***************************************************************************/
165 S16 duBuildRlcLsapCfg(Ent ent, Inst inst, U8 lsapInst)
169 KwSapCfg *lSap = NULLP;
172 DU_SET_ZERO(&kwMngmt, sizeof(KwMngmt));
173 DU_SET_ZERO(&pst, sizeof(Pst));
176 kwMngmt.hdr.msgType = TCFG;
177 kwMngmt.hdr.entId.ent = ENTKW;
178 kwMngmt.hdr.response.mem.region = (inst == RLC_UL_INST) ?
179 RLC_UL_MEM_REGION:RLC_DL_MEM_REGION;
181 kwMngmt.hdr.response.mem.pool = RLC_POOL;
184 pst.selector = DU_SELECTOR_LC;
185 pst.srcEnt = ENTDUAPP;
187 pst.dstProcId = DU_PROC;
189 pst.srcProcId = DU_PROC;
190 pst.region = duCb.init.region;
191 lSap = &(kwMngmt.t.cfg.s.sap);
193 lSap->mem.region = (inst == RLC_UL_INST) ?
194 RLC_UL_MEM_REGION:RLC_DL_MEM_REGION;
195 lSap->mem.pool = RLC_POOL;
197 lSap->bndTmrIntvl = 10;
198 lSap->priority = PRIOR0;
199 lSap->route = RTESPEC;
202 lSap->procId = DU_PROC;
204 lSap->inst = lsapInst;
205 lSap->sapId = lsapInst; /* SapId will be stored as suId in MAC */
206 lSap->selector = (inst == RLC_UL_INST) ? DU_SELECTOR_LWLC : DU_SELECTOR_TC;
207 kwMngmt.hdr.elmId.elmnt = STRGUSAP;
208 DU_LOG("\nDU_APP : RLC MAC Lower Sap Cfg Req sent for inst %d", inst);
213 lSap->procId = DU_PROC;
215 lSap->inst = (inst == RLC_UL_INST) ?
216 RLC_DL_INST : RLC_UL_INST;
218 lSap->selector = DU_SELECTOR_LC;
219 kwMngmt.hdr.elmId.elmnt = STUDXSAP;
220 DU_LOG("\nDU_APP : RLC DL/UL Lower Sap Cfg Req sent for inst %d", inst);
223 cmPkLkwCfgReq(&pst, &kwMngmt);
227 /**************************************************************************
228 * @brief Function to fill configs required by RLC
232 * Function : duBuildRlcUsapCfg
235 * Initiates general Configs towards RLC
237 * @param[in] Inst Specifies if RLC UL or RLC DL instance
238 * @return ROK - success
241 ***************************************************************************/
242 S16 duBuildRlcUsapCfg(U8 elemId, Ent ent, Inst inst)
245 KwSapCfg *uSap = NULLP;
248 DU_SET_ZERO(&kwMngmt, sizeof(KwMngmt));
249 DU_SET_ZERO(&pst, sizeof(Pst));
251 uSap = &(kwMngmt.t.cfg.s.sap);
253 uSap->selector = DU_SELECTOR_LC;
254 uSap->mem.region = (inst == RLC_UL_INST) ?
255 RLC_UL_MEM_REGION:RLC_DL_MEM_REGION;
256 uSap->mem.pool = RLC_POOL;
259 uSap->procId = DU_PROC;
263 uSap->inst = (inst == RLC_UL_INST) ?
264 RLC_DL_INST : RLC_UL_INST;
265 uSap->bndTmrIntvl = 1000;
266 uSap->priority = PRIOR0;
267 uSap->route = RTESPEC;
270 kwMngmt.hdr.msgType = TCFG;
271 kwMngmt.hdr.entId.ent = ENTKW;
272 kwMngmt.hdr.elmId.elmnt = STUDXSAP;
273 kwMngmt.hdr.response.mem.region = (inst == RLC_UL_INST) ?
274 RLC_UL_MEM_REGION:RLC_DL_MEM_REGION;
276 kwMngmt.hdr.response.mem.pool = RLC_POOL;
279 pst.selector = DU_SELECTOR_LC;
280 pst.srcEnt = ENTDUAPP;
282 pst.dstProcId = DU_PROC;
284 pst.srcProcId = DU_PROC;
285 pst.region = duCb.init.region;
287 DU_LOG("\nDU_APP : RLC Kwu Upper Sap Cfg Req sent for inst %d", inst);
288 cmPkLkwCfgReq(&pst, &kwMngmt);
293 /**************************************************************************
294 * @brief Function to populate internal DS of DU APP
298 * Function : duProcCfgComplete
301 * Populates internal data structures of DU APP after
302 * receiving configurations.
305 * @return ROK - success
308 ***************************************************************************/
309 S16 duProcCfgComplete()
312 static U16 cellId = 0;
314 for(idx=0; idx< DEFAULT_CELLS; idx++)
317 DU_ALLOC(cell, sizeof(DuCellCb))
320 DU_LOG("\nDU_APP : Memory Allocation failed in duProcCfgComplete");
327 memset(cell, 0, sizeof(DuCellCb));
328 cell->cellId = cellId++;
329 cell->cellInfo.nrEcgi.plmn.mcc[0] = PLMN_MCC0;
330 cell->cellInfo.nrEcgi.plmn.mcc[1] = PLMN_MCC1;
331 cell->cellInfo.nrEcgi.plmn.mcc[2] = PLMN_MCC2;
332 cell->cellInfo.nrEcgi.plmn.mnc[0] = PLMN_MNC0;
333 cell->cellInfo.nrEcgi.plmn.mnc[1] = PLMN_MNC1;
334 cell->cellInfo.nrEcgi.plmn.mnc[2] = PLMN_MNC2;
335 cell->cellInfo.nrEcgi.cellId = NR_CELL_ID;
336 cell->cellInfo.nrPci = NR_PCI;
337 cell->cellInfo.fiveGsTac = DU_TAC;
338 for(idx1=0; idx1<MAX_PLMN; idx1++)
340 cell->cellInfo.plmn[idx1].mcc[0] = PLMN_MCC0;
341 cell->cellInfo.plmn[idx1].mcc[1] = PLMN_MCC1;
342 cell->cellInfo.plmn[idx1].mcc[2] = PLMN_MCC2;
343 cell->cellInfo.plmn[idx1].mnc[0] = PLMN_MNC0;
344 cell->cellInfo.plmn[idx1].mnc[1] = PLMN_MNC1;
345 cell->cellInfo.plmn[idx1].mnc[2] = PLMN_MNC2;
347 cell->cellInfo.maxUe = duCfgParam.maxUe;
348 cell->cellStatus = CELL_OUT_OF_SERVICE;
349 nci = (U16)cell->cellInfo.nrEcgi.cellId;
351 duCb.cfgCellLst[nci-1] = cell;
356 //Start layer configs
357 ret = duSendRlcUlCfg();
361 /**************************************************************************
362 * @brief Function to invoke DU Layer Configs
366 * Function : duSendRlcUlCfg
369 * Initiates Configs towards layers of DU
372 * @return ROK - success
375 ***************************************************************************/
380 duBuildRlcCfg((Inst)RLC_UL_INST);
381 for(cellIdx = 0; cellIdx < DEFAULT_CELLS; cellIdx++)
383 duBuildRlcLsapCfg(ENTRG, (Inst)RLC_UL_INST, cellIdx);
385 duBuildRlcLsapCfg(ENTKW, (Inst)RLC_UL_INST, 0);
390 /**************************************************************************
391 * @brief Function to invoke DU Layer Configs
395 * Function : duSendRlcDlCfg
398 * Initiates Configs towards layers of DU
401 * @return ROK - success
404 ***************************************************************************/
409 duBuildRlcCfg((Inst)RLC_DL_INST);
410 duBuildRlcUsapCfg(STUDXSAP, ENTKW, (Inst)RLC_DL_INST);
411 for(cellIdx = 0; cellIdx < DEFAULT_CELLS; cellIdx++)
413 duBuildRlcLsapCfg(ENTRG, (Inst)RLC_DL_INST, cellIdx);
418 /**************************************************************************
419 * @brief Function to handle Config Confirm from RLC
423 * Function : duHdlRlcCfgComplete
426 * Handles Gen Config Confirm from RLC
428 * @param[in] Pst *pst, Post structure of the primitive.
429 * @param[in] KwMngmt *cfm, Unpacked primitive info received from RLC
430 * @return ROK - success
433 ***************************************************************************/
434 S16 duHdlRlcCfgComplete(Pst *pst, KwMngmt *cfm)
437 if (pst->srcInst == RLC_UL_INST)
439 ret = duProcRlcUlCfgComplete(pst, cfm);
443 ret = duProcRlcDlCfgComplete(pst, cfm);
448 /**************************************************************************
449 * @brief Function to handle Control Config Confirm from RLC
453 * Function : duHdlRlcCntrlCfgComplete
456 * Handles Control Config Confirm from RLC
458 * @param[in] Pst *pst, Post structure of the primitive.
459 * @param[in] KwMngmt *cfm, Unpacked primitive info received from RLC
460 * @return ROK - success
463 ***************************************************************************/
464 S16 duHdlRlcCntrlCfgComplete(Pst *pst, KwMngmt *cntrl)
468 if (cntrl->cfm.status == LCM_PRIM_OK)
470 switch (cntrl->hdr.elmId.elmnt)
474 if (pst->srcInst == RLC_DL_INST)
476 DU_LOG("\nDU_APP : BIND OF RLC DL TO MAC (RGU) SAP SUCCESSFUL");
478 if(macCfgInst < DEFAULT_CELLS)
481 duBindUnbindRlcToMacSap((Inst) RLC_DL_INST, ABND);
485 duBindUnbindRlcToMacSap((Inst) RLC_UL_INST, ABND);
490 DU_LOG("\nDU_APP : BIND OF RLC UL TO MAC (RGU) SAP SUCCESSFUL");
492 if(macCfgInst < DEFAULT_CELLS)
494 duBindUnbindRlcToMacSap((Inst) RLC_UL_INST, ABND);
508 /**************************************************************************
509 * @brief Function to handle Config Confirm from RLC UL
513 * Function : duHdlRlcUlCfgComplete
516 * Handles Config Confirm from RLC UL
518 * @param[in] Pst *pst, Post structure of the primitive.
519 * @param[in] KwMngmt *cfm, Unpacked primitive info received from RLC UL
520 * @return ROK - success
523 ***************************************************************************/
524 S16 duProcRlcUlCfgComplete(Pst *pst, KwMngmt *cfm)
528 DU_LOG("\nDU_APP : RLC UL Cfg Status %d", cfm->cfm.status);
529 if (cfm->cfm.status == LCM_PRIM_OK)
531 switch(cfm->hdr.elmId.elmnt)
535 rlcUlCfg |= RLC_GEN_CFG;
541 if(numRlcMacSaps == DEFAULT_CELLS)
543 rlcUlCfg |= RLC_MAC_SAP_CFG;
550 rlcUlCfg |= RLC_UDX_SAP_CFG;
557 DU_LOG("\nDU_APP : RLC UL Cfg Cfm received for the element %d ",cfm->hdr.elmId.elmnt);
558 if(rlcUlCfg == DU_RLC_UL_CONFIGURED)
562 //Start configuration of RLC DL
569 DU_LOG("\nDU_APP : Config confirm NOK from RLC UL");
575 /**************************************************************************
576 * @brief Function to handle Config Confirm from RLC DL
580 * Function : duHdlRlcDlCfgComplete
583 * Handles Config Confirm from RLC DL
585 * @param[in] Pst *pst, Post structure of the primitive.
586 * @param[in] KwMngmt *cfm, Unpacked primitive info received from RLC DL
587 * @return ROK - success
590 ***************************************************************************/
591 S16 duProcRlcDlCfgComplete(Pst *pst, KwMngmt *cfm)
593 DU_LOG("\nDU_APP : RLC DL Cfg Status %d", cfm->cfm.status);
594 if (cfm->cfm.status == LCM_PRIM_OK)
596 switch(cfm->hdr.elmId.elmnt)
600 rlcDlCfg |= RLC_GEN_CFG;
606 if(numRlcMacSaps == DEFAULT_CELLS)
608 rlcDlCfg |= RLC_MAC_SAP_CFG;
615 rlcDlCfg |= RLC_UDX_SAP_CFG;
623 DU_LOG("\nDU_APP : RLC DL Cfg Cfm received for the element %d ",cfm->hdr.elmId.elmnt);
624 if(rlcDlCfg == DU_RLC_DL_CONFIGURED)
627 //Start configuration of MAC
634 DU_LOG("\nDU_APP : Config confirm NOK from RLC DL");
639 /**************************************************************************
640 * @brief Function to send configs to MAC
644 * Function : duSendMacCfg
647 * Initiates Configs towards MAC layer
650 * @return ROK - success
653 ***************************************************************************/
657 duBuildMacUsapCfg(RLC_UL_INST);
658 duBuildMacUsapCfg(RLC_DL_INST);
663 /**************************************************************************
664 * @brief Function to fill gen config required by MAC
668 * Function : duBuildMacGenCfg
671 * Initiates general Configs towards MAC
674 * @return ROK - success
677 ***************************************************************************/
678 S16 duBuildMacGenCfg()
681 RgGenCfg *genCfg=NULLP;
684 DU_SET_ZERO(&pst, sizeof(Pst));
685 DU_SET_ZERO(&rgMngmt, sizeof(RgMngmt));
687 genCfg = &(rgMngmt.t.cfg.s.genCfg);
689 /*----------- Fill General Configuration Parameters ---------*/
690 genCfg->mem.region = MAC_MEM_REGION;
691 genCfg->mem.pool = RG_POOL;
693 genCfg->numRguSaps = 2;
695 genCfg->lmPst.dstProcId = DU_PROC;
696 genCfg->lmPst.srcProcId = DU_PROC;
697 genCfg->lmPst.dstEnt = ENTDUAPP;
698 genCfg->lmPst.dstInst = 0;
699 genCfg->lmPst.srcEnt = ENTRG;
700 genCfg->lmPst.srcInst = macCfgInst;
701 genCfg->lmPst.prior = PRIOR0;
702 genCfg->lmPst.route = RTESPEC;
703 genCfg->lmPst.region = MAC_MEM_REGION;
704 genCfg->lmPst.pool = RG_POOL;
705 genCfg->lmPst.selector = DU_SELECTOR_LC;
708 rgMngmt.hdr.msgType = TCFG;
709 rgMngmt.hdr.msgLen = 0;
710 rgMngmt.hdr.entId.ent = ENTRG;
711 rgMngmt.hdr.entId.inst = (Inst)0;
712 rgMngmt.hdr.elmId.elmnt = STGEN;
713 rgMngmt.hdr.seqNmb = 0;
714 rgMngmt.hdr.version = 0;
715 rgMngmt.hdr.transId = 0;
717 rgMngmt.hdr.response.prior = PRIOR0;
718 rgMngmt.hdr.response.route = RTESPEC;
719 rgMngmt.hdr.response.mem.region = MAC_MEM_REGION;
720 rgMngmt.hdr.response.mem.pool = RG_POOL;
721 rgMngmt.hdr.response.selector = DU_SELECTOR_LC;
724 pst.selector = DU_SELECTOR_LC;
725 pst.srcEnt = ENTDUAPP;
727 pst.dstInst = macCfgInst;
728 pst.dstProcId = DU_PROC;
729 pst.srcProcId = DU_PROC;
730 pst.region = duCb.init.region;
732 DU_LOG("\nDU_APP : MAC Gen Cfg Req sent");
734 /* Send the request to MAC */
735 cmPkLrgCfgReq(&pst, &rgMngmt);
740 /**************************************************************************
741 * @brief Function to fill USAP config required by MAC
745 * Function : duBuildMacUsapCfg
748 * Initiates USAP Configs towards MAC
750 * @param[in] SpId Specifies if RLC UL or RLC DL instance
751 * @return ROK - success
754 ***************************************************************************/
755 S16 duBuildMacUsapCfg(SpId sapId)
758 RgUpSapCfg *uSap = NULLP;
761 DU_SET_ZERO(&pst, sizeof(Pst));
762 DU_SET_ZERO(&rgMngmt, sizeof(RgMngmt));
764 uSap = &(rgMngmt.t.cfg.s.rguSap);
766 uSap->mem.region = MAC_MEM_REGION;
767 uSap->mem.pool = RG_POOL;
770 uSap->procId = DU_PROC;
773 uSap->prior = PRIOR0;
774 uSap->route = RTESPEC;
775 uSap->selector = DU_SELECTOR_LC ;
778 rgMngmt.hdr.msgType = TCFG;
779 rgMngmt.hdr.entId.ent = ENTRG;
780 rgMngmt.hdr.entId.inst = (Inst)0;
781 rgMngmt.hdr.elmId.elmnt = STRGUSAP;
782 rgMngmt.hdr.response.mem.region = MAC_MEM_REGION;
783 rgMngmt.hdr.response.mem.pool = RG_POOL;
786 pst.selector = DU_SELECTOR_LC;
787 pst.srcEnt = ENTDUAPP;
789 pst.dstInst = macCfgInst;
790 pst.dstProcId = DU_PROC;
791 pst.srcProcId = DU_PROC;
792 pst.region = duCb.init.region;
794 DU_LOG("\nDU_APP : MAC Rgu USap Cfg Req sent");
796 /* Send the request to MAC */
797 cmPkLrgCfgReq(&pst, &rgMngmt);
802 /**************************************************************************
803 * @brief Function to handle Config Confirm from MAC
807 * Function : duHdlMacCfgComplete
810 * Handles Gen Config Confirm from MAC
812 * @param[in] Pst *pst, Post structure of the primitive.
813 * @param[in] RgMngmt *cfm, Unpacked primitive info received from MAC
814 * @return ROK - success
817 ***************************************************************************/
818 S16 duHdlMacCfgComplete(Pst *pst, RgMngmt *cfm)
822 if (cfm->cfm.status == LCM_PRIM_OK)
824 switch (cfm->hdr.elmId.elmnt)
828 macCfg |= MAC_GEN_CFG;
833 macCfg |= MAC_SAP_CFG;
840 DU_LOG("\nDU_APP : MAC Cfg Cfm received for the element %d ",cfm->hdr.elmId.elmnt);
841 if(macCfg == MAC_CONFIGURED && numRlcMacSaps == MAX_MAC_SAP)
844 DU_LOG("\nDU_APP : Completed sending Configs");
846 duBindUnbindRlcToMacSap(RLC_DL_INST, ABND);
852 DU_LOG("\nDU_APP : Config confirm NOK from MAC");
858 /**************************************************************************
859 * @brief Function to bind/unbind RLC to MAC SAP
863 * Function : duBindUnbindRlcToMacSap
866 * Initiates Bind/Unbind from RLC to MAC
868 * @param[in] Inst Specifies if RLC UL or RLC DL instance
869 * @param[in] action Specifies if action is bind or unbind
870 * @return ROK - success
873 ***************************************************************************/
874 S16 duBindUnbindRlcToMacSap(U8 inst, U8 action)
876 KwCntrl *cntrl = NULLP;
880 TRC2(smBindKwToRguSap)
882 DU_SET_ZERO(&kwMngmt, sizeof(KwMngmt));
883 DU_SET_ZERO(&pst, sizeof(Pst));
887 DU_LOG("\nDU_APP : Cntrl Req to RLC inst %d to bind MAC sap", inst);
891 DU_LOG("\nDU_APP : Cntrl Req to RLC inst %d to unbind MAC sap", inst);
893 cntrl = &(kwMngmt.t.cntrl);
895 cntrl->action = action;
896 cntrl->subAction = DU_ZERO_VAL;
897 cntrl->s.sapCntrl.suId = macCfgInst;
898 cntrl->s.sapCntrl.spId = inst;
901 kwMngmt.hdr.msgType = TCNTRL;
902 kwMngmt.hdr.entId.ent = ENTKW;
903 kwMngmt.hdr.entId.inst = inst;
904 kwMngmt.hdr.elmId.elmnt = 186; /* ambiguous defines in lkw.h and lrg.h so direct hardcoded*/
905 kwMngmt.hdr.response.mem.region = (inst == RLC_UL_INST) ?
906 RLC_UL_MEM_REGION:RLC_DL_MEM_REGION;
907 kwMngmt.hdr.response.mem.pool = RLC_POOL;
910 pst.selector = DU_SELECTOR_LC;
911 pst.srcEnt = ENTDUAPP;
913 pst.dstProcId = DU_PROC;
915 pst.srcProcId = DU_PROC;
916 pst.region = duCb.init.region;
918 cmPkLkwCntrlReq(&pst, &kwMngmt);
922 /*******************************************************************
924 * @brief Handles SCTP notifications
928 * Function : duSctpNtfyHdl
931 * Handles SCTP notification
933 * @params[in] Message Buffer
936 * @return ROK - success
939 * ****************************************************************/
941 S16 duSctpNtfyHdl(Buffer *mBuf, CmInetSctpNotification *ntfy)
943 if(f1Params.assocId == ntfy->u.assocChange.assocId)
945 if(BuildAndSendF1SetupReq() != ROK)
950 else if(ricParams.assocId == ntfy->u.assocChange.assocId)
952 if(BuildAndSendE2SetupReq() != ROK)
959 DU_LOG("\nDU_APP : Invalid assocId %d received", ntfy->u.assocChange.assocId);
965 /*******************************************************************
967 * @brief Fills Pst struct for ENTEGTP
971 * Function : duFillEgtpPst
974 * Fills Pst struct for ENTEGTP
977 * @return ROK - success
980 * ****************************************************************/
981 S16 duFillEgtpPst(Pst *pst, Event event)
983 cmMemset((U8 *)pst, 0, sizeof(Pst));
984 pst->srcEnt = (Ent)ENTDUAPP;
985 pst->srcInst = (Inst)DU_INST;
986 pst->srcProcId = DU_PROC;
987 pst->dstEnt = (Ent)ENTEGTP;
988 pst->dstInst = (Inst)EGTP_INST;
989 pst->dstProcId = pst->srcProcId;
991 pst->selector = DU_SELECTOR_LC;
998 /*******************************************************************
1000 * @brief Function to configure EGTP
1004 * Function : duBuildEgtpCfgReq
1007 * Function to configure EGTP
1010 * @return ROK - success
1013 * ****************************************************************/
1015 S16 duBuildEgtpCfgReq()
1020 DU_LOG("\nDU_APP : Sending EGTP config request");
1022 cmMemset((U8 *)&egtpCfg, 0, sizeof(EgtpConfig));
1023 cmMemcpy((U8 *)&egtpCfg, (U8 *)&duCfgParam.egtpParams, (PTR)sizeof(EgtpConfig));
1025 duFillEgtpPst(&pst, EVTCFGREQ);
1026 packEgtpCfgReq(&pst, egtpCfg);
1031 /*******************************************************************
1033 * @brief Function to configure EGTP
1037 * Function : duBuildEgtpCfgReq
1040 * Function to configure EGTP
1043 * @return ROK - success
1046 * ****************************************************************/
1047 S16 duHdlEgtpCfgComplete(CmStatus cfm)
1051 if(cfm.status == LCM_PRIM_OK)
1053 DU_LOG("\nDU_APP : EGTP configuraton complete");
1055 duSendEgtpSrvOpenReq();
1060 DU_LOG("\nDU_APP : EGTP configuraton failed");
1067 /*******************************************************************
1069 * @brief Sends server open request to EGTP
1073 * Function : duSendEgtpSrvOpenReq
1076 * Sends server open request to EGTP
1079 * @return ROK - success
1082 * ****************************************************************/
1084 S16 duSendEgtpSrvOpenReq()
1088 DU_LOG("\nDU_APP : Sending EGTP server open request");
1090 duFillEgtpPst(&pst, EVTSRVOPENREQ);
1091 packEgtpSrvOpenReq(&pst);
1096 /*******************************************************************
1098 * @brief Handles server open confirmation
1102 * Function : duHdlEgtpSrvOpenComplete
1105 * Handles server open confirmation
1108 * @return ROK - success
1111 *****************************************************************/
1113 S16 duHdlEgtpSrvOpenComplete(CmStatus cfm)
1117 if(cfm.status == LCM_PRIM_OK)
1119 DU_LOG("\nDU_APP : EGTP server opened successfully");
1121 duSendEgtpTnlMgmtReq(EGTP_TNL_MGMT_ADD, EGTP_LCL_TEID, EGTP_REM_TEID);
1126 DU_LOG("\nDU_APP : EGTP server opening failed");
1133 /*******************************************************************
1135 * @brief Sends tunnel management request
1139 * Function : duSendEgtpTnlMgmtReq
1142 * Builds and sends tunnel management request to EGTP
1144 * @params[in] Action
1145 * Local tunnel endpoint id
1146 * Remote tunnel endpoint id
1147 * @return ROK - success
1150 * ****************************************************************/
1152 S16 duSendEgtpTnlMgmtReq(U8 action, U32 lclTeid, U32 remTeid)
1157 tnlEvt.action = action;
1158 tnlEvt.lclTeid = lclTeid;
1159 tnlEvt.remTeid = remTeid;
1161 DU_LOG("\nDU_APP : Sending EGTP tunnel management request");
1163 duFillEgtpPst(&pst, EVTTNLMGMTREQ);
1164 packEgtpTnlMgmtReq(&pst, tnlEvt);
1169 /*******************************************************************
1171 * @brief Handles Tunnel management confirm
1175 * Function : duHdlEgtpTnlMgmtCfm
1178 * Handles tunnel management confirm received from Egtp
1180 * @params[in] Tunnel Event
1181 * @return ROK - success
1184 * ****************************************************************/
1185 S16 duHdlEgtpTnlMgmtCfm(EgtpTnlEvt tnlEvtCfm)
1189 if(tnlEvtCfm.cfmStatus.status == LCM_PRIM_OK)
1191 DU_LOG("\nDU_APP : Tunnel management confirm OK");
1194 duSendUeCreateReqToRlc();
1196 duSendEgtpTestData();
1201 DU_LOG("\nDU_APP : Tunnel management failed");
1208 S16 duSendEgtpDatInd(Buffer *mBuf)
1212 /* Fill EGTP header */
1213 egtpMsg.msgHdr.msgType = EGTPU_MSG_GPDU;
1214 egtpMsg.msgHdr.nPdu.pres = FALSE;
1215 egtpMsg.msgHdr.seqNum.pres = FALSE;
1216 egtpMsg.msgHdr.extHdr.udpPort.pres = FALSE;
1217 egtpMsg.msgHdr.extHdr.pdcpNmb.pres = FALSE;
1218 egtpMsg.msgHdr.teId = 1;
1221 egtpHdlDatInd(egtpMsg);
1228 /*******************************************************************
1230 * @brief Simulate UL Data for intial test
1234 * Function : duSendEgtpTestData
1237 * Simulate UL data for initial test
1240 * @return ROK - success
1243 * ****************************************************************/
1244 S16 duSendEgtpTestData()
1246 char data[30] = "This is EGTP data from DU";
1251 if(SGetMsg(DU_APP_MEM_REGION, DU_POOL, &mBuf) == ROK)
1253 if(SAddPstMsgMult((Data *)data, datSize, mBuf) != ROK)
1255 DU_LOG("\nDU_APP : SAddPstMsgMult failed");
1262 DU_LOG("\nDU_APP : Failed to allocate memory");
1266 /* filling IPv4 header */
1271 SFndLenMsg(mBuf, &mLen);
1273 cmMemset((U8 *)&ipv4Hdr, 0, sizeof(CmIpv4Hdr));
1274 ipv4Hdr.length = CM_IPV4_HDRLEN + mLen;
1275 ipv4Hdr.hdrVer = 0x45;
1277 ipv4Hdr.srcAddr = CM_INET_NTOH_U32(duCfgParam.egtpParams.localIp.ipV4Addr);
1278 ipv4Hdr.destAddr = CM_INET_NTOH_U32(duCfgParam.egtpParams.destIp.ipV4Addr);
1280 /* Packing IPv4 header into buffer */
1282 Data revPkArray[CM_IPV4_HDRLEN];
1283 Data pkArray[CM_IPV4_HDRLEN];
1285 /* initialize locals */
1287 cmMemset(revPkArray, 0, CM_IPV4_HDRLEN);
1288 cmMemset(pkArray, 0, CM_IPV4_HDRLEN);
1290 /* Pack Header Version */
1291 pkArray[cnt++] = ipv4Hdr.hdrVer;
1294 pkArray[cnt++] = ipv4Hdr.tos;
1296 pkArray[cnt++] = (Data)GetHiByte(ipv4Hdr.length);
1297 pkArray[cnt++] = (Data)GetLoByte(ipv4Hdr.length);
1300 pkArray[cnt++] = (Data) GetHiByte(ipv4Hdr.id);
1301 pkArray[cnt++] = (Data) GetLoByte(ipv4Hdr.id);
1304 pkArray[cnt++] = (Data)GetHiByte(ipv4Hdr.off);
1305 pkArray[cnt++] = (Data)GetLoByte(ipv4Hdr.off);
1308 pkArray[cnt++] = ipv4Hdr.ttl;
1311 pkArray[cnt++] = ipv4Hdr.proto;
1314 pkArray[cnt++] = (Data)GetHiByte(ipv4Hdr.chkSum);
1315 pkArray[cnt++] = (Data)GetLoByte(ipv4Hdr.chkSum);
1317 /* Pack Source Address */
1318 pkArray[cnt++] = (Data)GetHiByte(GetHiWord(ipv4Hdr.srcAddr));
1319 pkArray[cnt++] = (Data)GetLoByte(GetHiWord(ipv4Hdr.srcAddr));
1320 pkArray[cnt++] = (Data)GetHiByte(GetLoWord(ipv4Hdr.srcAddr));
1321 pkArray[cnt++] = (Data)GetLoByte(GetLoWord(ipv4Hdr.srcAddr));
1323 /* Pack Destination Address */
1324 pkArray[cnt++] = (Data)GetHiByte(GetHiWord(ipv4Hdr.destAddr));
1325 pkArray[cnt++] = (Data)GetLoByte(GetHiWord(ipv4Hdr.destAddr));
1326 pkArray[cnt++] = (Data)GetHiByte(GetLoWord(ipv4Hdr.destAddr));
1327 pkArray[cnt++] = (Data)GetLoByte(GetLoWord(ipv4Hdr.destAddr));
1329 for (idx = 0; idx < CM_IPV4_HDRLEN; idx++)
1330 revPkArray[idx] = pkArray[CM_IPV4_HDRLEN - idx -1];
1332 /* this function automatically reverses revPkArray */
1333 ret = SAddPreMsgMult(revPkArray, (MsgLen)cnt, mBuf);
1335 duSendEgtpDatInd(mBuf);
1339 #endif /* EGTP_TEST */
1342 /**************************************************************************
1343 * @brief Function to send configs to SCH
1347 * Function : duSendSchCfg
1350 * Sends general config to Scheduler via MAC layer
1353 * @return ROK - success
1356 ***************************************************************************/
1360 RgSchInstCfg *cfg = NULLP;
1363 DU_SET_ZERO(&pst, sizeof(Pst));
1364 DU_SET_ZERO(&rgMngmt, sizeof(RgMngmt));
1366 cfg = &(rgMngmt.t.cfg.s.schInstCfg);
1368 /* Filling of Instance Id */
1369 cfg->instId = DEFAULT_CELLS + 1;
1370 /* Filling of Gen config */
1371 cfg->genCfg.mem.region = MAC_MEM_REGION;
1372 cfg->genCfg.mem.pool = RG_POOL;
1373 cfg->genCfg.tmrRes = 10;
1376 cfg->genCfg.forceCntrlSrbBoOnPCel = FALSE;
1377 cfg->genCfg.isSCellActDeactAlgoEnable = TRUE;
1379 cfg->genCfg.startCellId = 1;
1380 cfg->genCfg.lmPst.dstProcId = DU_PROC;
1381 cfg->genCfg.lmPst.srcProcId = DU_PROC;
1382 cfg->genCfg.lmPst.dstEnt = ENTDUAPP;
1383 cfg->genCfg.lmPst.dstInst = DU_INST;
1384 cfg->genCfg.lmPst.srcEnt = ENTRG;
1385 cfg->genCfg.lmPst.srcInst = DEFAULT_CELLS + 1;
1386 cfg->genCfg.lmPst.prior = PRIOR0;
1387 cfg->genCfg.lmPst.route = RTESPEC;
1388 cfg->genCfg.lmPst.region = MAC_MEM_REGION;
1389 cfg->genCfg.lmPst.pool = RG_POOL;
1390 cfg->genCfg.lmPst.selector = DU_SELECTOR_LC;
1393 rgMngmt.hdr.msgType = TCFG;
1394 rgMngmt.hdr.entId.ent = ENTRG;
1395 rgMngmt.hdr.entId.inst = DU_INST;
1396 rgMngmt.hdr.elmId.elmnt = STSCHINST;
1397 rgMngmt.hdr.response.mem.region = MAC_MEM_REGION;
1398 rgMngmt.hdr.response.mem.pool = RG_POOL;
1401 pst.selector = DU_SELECTOR_LC;
1402 pst.srcEnt = ENTDUAPP;
1404 pst.dstProcId = DU_PROC;
1405 pst.srcProcId = DU_PROC;
1406 pst.srcInst = DU_INST;
1408 pst.region = duCb.init.region;
1409 pst.event = (Event) EVTMACSCHGENCFGREQ;
1411 DU_LOG("\nDU_APP : MAC Sch Cfg sent");
1413 /* Send the request to MAC */
1414 cmPkLrgSchCfgReq(&pst, &rgMngmt);
1420 /**************************************************************************
1421 * @brief Function to configure SCTP params and
1422 * responsible for F1 and E2 interfaces
1426 * Function : duLayerConfigComplete
1429 * Configures SCTP Params and responsible for handling
1430 * F1 and E2 interface.
1433 * @return ROK - success
1436 ***************************************************************************/
1437 S16 duLayerConfigComplete()
1441 DU_LOG("\nDU_APP : Configuring all Layer is complete");
1443 if((ret = duSctpCfgReq(duCfgParam.sctpParams)) != ROK)
1445 DU_LOG("\nDU_APP : Failed configuring Sctp Params");
1448 if((ret = duSctpAssocReq(F1_INTERFACE)) != ROK)
1450 DU_LOG("\nDU_APP : Failed to send AssocReq F1");
1453 if((ret = duSctpAssocReq(E2_INTERFACE)) != ROK)
1455 DU_LOG("\nDU_APP : Failed to send AssocReq E2");
1462 /**************************************************************************
1463 * @brief Function to handle SCH Config Confirm from MAC
1467 * Function : duHdlSchCfgComplete
1470 * Handles Scheduler Gen Config Confirm from MAC
1472 * @param[in] Pst *pst, Post structure of the primitive.
1473 * @param[in] RgMngmt *cfm, Unpacked primitive info received from MAC
1474 * @return ROK - success
1477 ***************************************************************************/
1478 S16 duHdlSchCfgComplete(Pst *pst, RgMngmt *cfm)
1480 if (cfm->cfm.status == LCM_PRIM_OK)
1482 switch (cfm->hdr.elmId.elmnt)
1486 DU_LOG("\nDU_APP : Received SCH CFG CFM at DU APP");
1493 duLayerConfigComplete();
1494 duBuildEgtpCfgReq();
1498 /*******************************************************************
1500 * @brief Sends Slot indication to EGTP
1504 * Function : duSendEgtpSlotInd
1507 * Sends Slot indication to EGTP
1510 * @return ROK - success
1513 * ****************************************************************/
1514 S16 duSendEgtpSlotInd()
1518 duFillEgtpPst(&pst, EVTSLOTIND);
1519 packEgtpSlotInd(&pst);
1525 /**************************************************************************
1526 * @brief Function to fill and send MacCellconfig
1530 * Function : duBuildAndSendMacCellCfg
1533 * Initiates MAC Configs towards MAC
1536 * @return ROK - success
1539 ***************************************************************************/
1540 S16 duBuildAndSendMacCellCfg()
1543 DU_SET_ZERO(&pst, sizeof(Pst));
1544 MacCellCfg *duMacCellCfg = NULLP;
1546 DU_ALLOC(duMacCellCfg, sizeof(MacCellCfg));
1547 if(duMacCellCfg == NULLP)
1552 /* store the address in the duCb so that we can free on confirm msg */
1553 duCb.duMacCellCfg = duMacCellCfg;
1555 /* copy the mac config structure from duCfgParams */
1556 memcpy(duMacCellCfg,&duCfgParam.macCellCfg,sizeof(MacCellCfg));
1558 duMacCellCfg->transId = getTransId(); /* transaction ID */
1561 pst.selector = DU_SELECTOR_LWLC;
1562 pst.srcEnt = ENTDUAPP;
1566 pst.dstProcId = DU_PROC;
1567 pst.srcProcId = DU_PROC;
1568 pst.region = duCb.init.region;
1569 pst.event = EVENT_MAC_CELL_CONFIG_REQ;
1571 /* Send MAC cell config to MAC */
1572 return (*packMacCellCfgOpts[pst.selector])(&pst, duMacCellCfg);
1575 /**************************************************************************
1576 * @brief Function to Handle MAC cell config confirm
1580 * Function : duHandleMacCellCfgCfm
1583 * Initiates general Configs towards MAC
1586 * @return ROK - success
1589 ***************************************************************************/
1590 int duHandleMacCellCfgCfm(Pst *pst, MacCellCfgCfm *macCellCfgCfm)
1594 if(macCellCfgCfm->rsp == ROK)
1596 if(macCellCfgCfm->transId == duCb.duMacCellCfg->transId)
1598 /* free the memory allocated during sending macCellCfg request */
1599 DU_FREE(duCb.duMacCellCfg->sib1Cfg.sib1Pdu, duCfgParam.srvdCellLst[0].duSysInfo.sib1Len);
1600 DU_FREE(duCb.duMacCellCfg,sizeof(MacCellCfg));
1601 duCb.duMacCellCfg = NULLP;
1603 /* Build and send GNB-DU config update */
1604 ret = BuildAndSendDUConfigUpdate();
1606 /* TODO: Trigger cell start req once cell up slot ind is received*/
1607 /* Build and Send Cell Start Req to MAC */
1608 ret = duBuildAndSendMacCellStartReq();
1613 /* transaction ID missmatch */
1614 DU_LOG("\n transaction ID mismatch in macCellCfg");
1620 DU_LOG("\nMac cell cfg failed");
1626 /*******************************************************************
1628 * @brief Handles slot indication from MAC
1632 * Function : duHandleSlotInd
1635 * Handles slot indication from MAC
1637 * @params[in] Post structure pointer
1639 * @return ROK - success
1642 * ****************************************************************/
1643 uint16_t duHandleSlotInd(Pst *pst, SlotInfo *slotInfo)
1646 DU_LOG("\nDU APP : Slot Indication received");
1648 if(slotInfo->cellId <=0 || slotInfo->cellId > DU_MAX_CELLS)
1650 DU_LOG("\nDU APP : Invalid Cell Id %d", slotInfo->cellId);
1652 if(!duCb.actvCellLst[slotInfo->cellId-1]->firstSlotIndRcvd)
1654 duCb.actvCellLst[slotInfo->cellId-1]->firstSlotIndRcvd = true;
1655 if((duCb.actvCellLst[slotInfo->cellId-1] != NULL) && \
1656 (duCb.actvCellLst[slotInfo->cellId-1]->cellStatus == \
1657 ACTIVATION_IN_PROGRESS))
1659 DU_LOG("\nDU APP : 5G-NR Cell %d is UP", slotInfo->cellId);
1660 duCb.actvCellLst[slotInfo->cellId-1]->cellStatus = ACTIVATED;
1665 /* TODO : Slot Indication to be moved out of EGTP_TEST when
1666 * data path is established */
1668 duSendEgtpSlotInd();
1671 if((pst->selector == DU_SELECTOR_LWLC) || (pst->selector == DU_SELECTOR_TC))
1672 DU_FREE_SHRABL_BUF(MAC_MEM_REGION, pst->pool, slotInfo, sizeof(SlotInfo));
1677 /*******************************************************************
1679 * @brief Builds and sends cell start request to MAC
1683 * Function : duBuildAndSendMacCellStartReq
1686 * Builds and sends cell start request to MAC
1689 * @return ROK - success
1692 * ****************************************************************/
1693 uint16_t duBuildAndSendMacCellStartReq()
1696 MacCellStartInfo *cellStartInfo = NULL;
1698 DU_LOG("\nDU APP : Building and Sending cell start request to MAC");
1700 /* Send Cell Start Request to MAC */
1701 DU_ALLOC_SHRABL_BUF(cellStartInfo, sizeof(MacCellStartInfo));
1704 DU_LOG("\nDU APP : Memory alloc failed while building cell start request");
1708 for(uint8_t id = 0; id < DU_MAX_CELLS; id++)
1710 if(duCb.actvCellLst[id])
1712 duCb.actvCellLst[id]->firstSlotIndRcvd = FALSE;
1713 cellStartInfo->cellId = duCb.actvCellLst[id]->cellInfo.nrEcgi.cellId;
1716 pst.selector = DU_MAC_LWLC;
1717 pst.srcEnt = ENTDUAPP;
1721 pst.dstProcId = DU_PROC;
1722 pst.srcProcId = DU_PROC;
1723 pst.region = DU_APP_MEM_REGION;
1725 pst.event = EVENT_MAC_CELL_START_REQ;
1727 return (*packMacCellStartReqOpts[pst.selector])(&pst, cellStartInfo);
1733 /*******************************************************************
1735 * @brief Builds and sends cell stop request to MAC
1739 * Function : duBuildAndSendMacCellStopReq
1742 * Builds and sends cell stop request to MAC
1745 * @return ROK - success
1748 * ****************************************************************/
1749 uint16_t duBuildAndSendMacCellStopReq()
1752 MacCellStopInfo *cellStopInfo = NULL;
1754 DU_LOG("\nDU APP : Building and Sending cell stop request to MAC");
1756 /* Send Cell Stop Request to MAC */
1757 DU_ALLOC_SHRABL_BUF(cellStopInfo, sizeof(MacCellStopInfo));
1760 DU_LOG("\nDU APP : Memory alloc failed while building cell stop request");
1763 cellStopInfo->cellId = duCb.actvCellLst[0]->cellId;
1766 pst.selector = DU_MAC_LWLC;
1767 pst.srcEnt = ENTDUAPP;
1771 pst.dstProcId = DU_PROC;
1772 pst.srcProcId = DU_PROC;
1773 pst.region = DU_APP_MEM_REGION;
1775 pst.event = EVENT_MAC_CELL_STOP_REQ;
1777 return (*packMacCellStopReqOpts[pst.selector])(&pst, cellStopInfo);
1780 /*******************************************************************
1782 * @brief Handles stop indication from MAC
1786 * Function : duHandleStopInd
1789 * Handles stop indication from MAC
1791 * @params[in] Post structure pointer
1792 * @return ROK - success
1795 * ****************************************************************/
1796 uint16_t duHandleStopInd(Pst *pst, MacCellStopInfo *cellStopId)
1798 if(cellStopId->cellId <=0 || cellStopId->cellId > DU_MAX_CELLS)
1800 DU_LOG("\nDU APP : Invalid Cell Id %d", cellStopId->cellId);
1802 if(duCb.actvCellLst[cellStopId->cellId-1] != NULL)
1804 if(duCb.actvCellLst[cellStopId->cellId-1]->firstSlotIndRcvd)
1806 duCb.actvCellLst[cellStopId->cellId-1]->firstSlotIndRcvd = false;
1807 if((duCb.actvCellLst[cellStopId->cellId-1]->cellStatus == \
1810 DU_LOG("\nDU APP : 5G-NR Cell %d is DOWN", cellStopId->cellId);
1811 duCb.actvCellLst[cellStopId->cellId-1]->cellStatus = DELETION_IN_PROGRESS;
1815 if((pst->selector == DU_SELECTOR_LWLC) || (pst->selector == DU_SELECTOR_TC))
1816 DU_FREE_SHRABL_BUF(MAC_MEM_REGION, pst->pool, cellStopId, sizeof(MacCellStopInfo));
1821 /*******************************************************************
1823 * @brief Handles slot indication from MAC
1827 * Function : duHandleUlCcchInd
1830 * Handles UL CCCH indication from MAC
1832 * @params[in] Post structure pointer
1833 * UL CCCH Ind pointer
1834 * @return ROK - success
1837 * ****************************************************************/
1838 uint16_t duHandleUlCcchInd(Pst *pst, UlCcchIndInfo *ulCcchIndInfo)
1841 DU_LOG("\nDU APP : UL CCCH Indication received");
1843 return (duProcUlCcchInd(ulCcchIndInfo));
1847 /**********************************************************************
1849 **********************************************************************/