X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fdu_app%2Fdu_msg_hdl.c;h=be2bb5491bf23ceafaa8f9eaa5066d31b2cd8d07;hb=d2d9dcbd92e8f1be15dd5891aaf9ada9bc071e1a;hp=2f77a76d95f4e7946190e09ac2e080057aaa4093;hpb=80a4fa9d0aede180472530cab6efa6acc925424b;p=o-du%2Fl2.git diff --git a/src/du_app/du_msg_hdl.c b/src/du_app/du_msg_hdl.c index 2f77a76d9..be2bb5491 100644 --- a/src/du_app/du_msg_hdl.c +++ b/src/du_app/du_msg_hdl.c @@ -317,8 +317,7 @@ S16 duProcCfgComplete() else { U32 nci; - U8 idx; - + U8 idx1; memset(cell, 0, sizeof(DuCellCb)); cell->cellId = cellId++; cell->cellInfo.nrEcgi.plmn.mcc[0] = PLMN_MCC0; @@ -330,15 +329,15 @@ S16 duProcCfgComplete() cell->cellInfo.nrEcgi.cellId = NR_CELL_ID; cell->cellInfo.nrPci = NR_PCI; cell->cellInfo.fiveGsTac = DU_TAC; - for(idx=0; idxcellInfo.plmn[idx].mcc[0] = PLMN_MCC0; - cell->cellInfo.plmn[idx].mcc[1] = PLMN_MCC1; - cell->cellInfo.plmn[idx].mcc[2] = PLMN_MCC2; - cell->cellInfo.plmn[idx].mnc[0] = PLMN_MNC0; - cell->cellInfo.plmn[idx].mnc[1] = PLMN_MNC1; - cell->cellInfo.plmn[idx].mnc[2] = PLMN_MNC2; - } + cell->cellInfo.plmn[idx1].mcc[0] = PLMN_MCC0; + cell->cellInfo.plmn[idx1].mcc[1] = PLMN_MCC1; + cell->cellInfo.plmn[idx1].mcc[2] = PLMN_MCC2; + cell->cellInfo.plmn[idx1].mnc[0] = PLMN_MNC0; + cell->cellInfo.plmn[idx1].mnc[1] = PLMN_MNC1; + cell->cellInfo.plmn[idx1].mnc[2] = PLMN_MNC2; + } cell->cellInfo.maxUe = duCfgParam.maxUe; cell->cellStatus = CELL_OUT_OF_SERVICE; nci = (U16)cell->cellInfo.nrEcgi.cellId; @@ -1591,6 +1590,7 @@ uint16_t duHandleMacCellCfgCfm(MacCellCfgCfm *macCellCfgCfm) if(macCellCfgCfm->transId == duCb.duMacCellCfg->transId) { /* free the memory allocated during sending macCellCfg request */ + DU_FREE(duCb.duMacCellCfg->sib1Cfg.sib1Pdu, duCfgParam.srvdCellLst[0].duSysInfo.sib1Len); DU_FREE(duCb.duMacCellCfg,sizeof(MacCellCfg)); duCb.duMacCellCfg = NULLP; @@ -1599,7 +1599,7 @@ uint16_t duHandleMacCellCfgCfm(MacCellCfgCfm *macCellCfgCfm) /* TODO: Trigger cell start req once cell up slot ind is received*/ /* Build and Send Cell Start Req to MAC */ - //ret = duBuildAndSendMacCellStartReq(); + ret = duBuildAndSendMacCellStartReq(); } else @@ -1639,6 +1639,23 @@ uint16_t duHandleSlotInd(Pst *pst, SlotInfo *slotInfo) DU_LOG("\nDU APP : Slot Indication received"); + if(slotInfo->cellId <=0 || slotInfo->cellId > DU_MAX_CELLS) + { + DU_LOG("\nDU APP : Invalid Cell Id %d", slotInfo->cellId); + } + if(!duCb.actvCellLst[slotInfo->cellId-1]->firstSlotIndRcvd) + { + duCb.actvCellLst[slotInfo->cellId-1]->firstSlotIndRcvd = true; + if((duCb.actvCellLst[slotInfo->cellId-1] != NULL) && \ + (duCb.actvCellLst[slotInfo->cellId-1]->cellStatus == \ + ACTIVATION_IN_PROGRESS)) + { + DU_LOG("\nDU APP : Cell Id %d is ACTIVE", slotInfo->cellId); + duCb.actvCellLst[slotInfo->cellId-1]->cellStatus = ACTIVATED; + } + + } + /* TODO : Slot Indication to be moved out of EGTP_TEST when * data path is established */ #ifdef EGTP_TEST @@ -1683,6 +1700,7 @@ uint16_t duBuildAndSendMacCellStartReq() { if(duCb.actvCellLst[id]) { + duCb.actvCellLst[id]->firstSlotIndRcvd = FALSE; cellStartInfo->cellId = duCb.actvCellLst[id]->cellInfo.nrEcgi.cellId; /* Fill Pst */