#ifdef O1_ENABLE
#include "AlarmInterface.h"
-#include "ConfigInterface.h"
-
-/*TODO: Uncomment when PM O1 gerrit gets ready*/
-#if 0
+#include "CmInterface.h"
#include "PmInterface.h"
-#endif
#endif
uint8_t packRlcConfigReq(Pst *pst, RlcMngmt *cfg);
uint8_t cmPkLkwCntrlReq(Pst *pst, RlcMngmt *cfg);
uint8_t cmPkLrgCfgReq(Pst *pst, RgMngmt *cfg);
-uint8_t BuildAndSendE2SetupReq();
uint8_t egtpHdlDatInd(EgtpMsg egtpMsg);
uint8_t BuildAndSendDUConfigUpdate();
uint16_t getTransId();
uint8_t duProcCfgComplete()
{
uint8_t ret = ROK;
- uint16_t cellId = 0;
uint16_t idx;
for(idx=0; idx< DEFAULT_CELLS; idx++)
{
{
uint8_t idx1=0;
memset(cell, 0, sizeof(DuCellCb));
- cell->cellId = ++cellId;
+ cell->cellId = NR_CELL_ID; //++cellId;
memset(&cell->cellInfo.nrEcgi.plmn, 0, sizeof(Plmn));
- cell->cellInfo.nrEcgi.plmn.mcc[0] = PLMN_MCC0;
- cell->cellInfo.nrEcgi.plmn.mcc[1] = PLMN_MCC1;
- cell->cellInfo.nrEcgi.plmn.mcc[2] = PLMN_MCC2;
- cell->cellInfo.nrEcgi.plmn.mnc[0] = PLMN_MNC0;
- cell->cellInfo.nrEcgi.plmn.mnc[1] = PLMN_MNC1;
+ cell->cellInfo.nrEcgi.plmn.mcc[0] = duCfgParam.srvdCellLst[0].duCellInfo.cellInfo.srvdPlmn[0].plmn.mcc[0];
+ cell->cellInfo.nrEcgi.plmn.mcc[1] = duCfgParam.srvdCellLst[0].duCellInfo.cellInfo.srvdPlmn[0].plmn.mcc[1];
+ cell->cellInfo.nrEcgi.plmn.mcc[2] = duCfgParam.srvdCellLst[0].duCellInfo.cellInfo.srvdPlmn[0].plmn.mcc[2];
+ cell->cellInfo.nrEcgi.plmn.mnc[0] = duCfgParam.srvdCellLst[0].duCellInfo.cellInfo.srvdPlmn[0].plmn.mnc[0];
+ cell->cellInfo.nrEcgi.plmn.mnc[1] = duCfgParam.srvdCellLst[0].duCellInfo.cellInfo.srvdPlmn[0].plmn.mnc[1];
+ cell->cellInfo.nrEcgi.plmn.mnc[2] = duCfgParam.srvdCellLst[0].duCellInfo.cellInfo.srvdPlmn[0].plmn.mnc[2];
cell->cellInfo.nrEcgi.cellId = cell->cellId;
- cell->cellInfo.nrPci = NR_PCI;
- cell->cellInfo.fiveGsTac = DU_TAC;
+ cell->cellInfo.nrPci = duCfgParam.srvdCellLst[0].duCellInfo.cellInfo.nrPci;
+ cell->cellInfo.fiveGsTac = duCfgParam.srvdCellLst[0].duCellInfo.tac;
memset(&cell->cellInfo.plmn[idx1], 0, sizeof(Plmn));
for(idx1=0; idx1<MAX_PLMN; idx1++)
{
- 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].mcc[0] = duCfgParam.srvdCellLst[0].duCellInfo.cellInfo.srvdPlmn[0].plmn.mcc[0];
+ cell->cellInfo.plmn[idx1].mcc[1] = duCfgParam.srvdCellLst[0].duCellInfo.cellInfo.srvdPlmn[0].plmn.mcc[1];
+ cell->cellInfo.plmn[idx1].mcc[2] = duCfgParam.srvdCellLst[0].duCellInfo.cellInfo.srvdPlmn[0].plmn.mcc[2];
+ cell->cellInfo.plmn[idx1].mnc[0] = duCfgParam.srvdCellLst[0].duCellInfo.cellInfo.srvdPlmn[0].plmn.mnc[0];
+ cell->cellInfo.plmn[idx1].mnc[1] = duCfgParam.srvdCellLst[0].duCellInfo.cellInfo.srvdPlmn[0].plmn.mnc[1];
+ cell->cellInfo.plmn[idx1].mnc[2] = duCfgParam.srvdCellLst[0].duCellInfo.cellInfo.srvdPlmn[0].plmn.mnc[2];
}
cell->cellInfo.maxUe = duCfgParam.maxUe;
cell->cellStatus = CELL_OUT_OF_SERVICE;
gCellStatus = CELL_DOWN;
- cell->gnbDuUeF1apIdGenerator = 0;
duCb.cfgCellLst[duCb.numCfgCells] = cell;
duCb.numCfgCells++;
}
{
if(BuildAndSendF1SetupReq() != ROK)
{
- return RFAILED;
+ return RFAILED;
}
}
else if(ricParams.assocId == ntfy->u.assocChange.assocId)
{
- if(BuildAndSendE2SetupReq() != ROK)
- {
- return RFAILED;
- }
+ return ROK;
}
else
{
}
/* store the address in the duCellCb so that we can free on confirm msg */
- duCb.actvCellLst[cellId-1]->duMacCellCfg = duMacCellCfg;
+ if(duCb.actvCellLst[cellId-1])
+ duCb.actvCellLst[cellId-1]->duMacCellCfg = duMacCellCfg;
+ else
+ {
+ DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, duMacCellCfg, sizeof(MacCellCfg));
+ return RFAILED;
+ }
/* copy the mac config structure from duCfgParams */
memcpy(duMacCellCfg,&duCfgParam.macCellCfg,sizeof(MacCellCfg));
for(actvCellIdx = 0; actvCellIdx < MAX_NUM_CELL; actvCellIdx++)
{
- if(macCellCfgCfm->cellId == duCb.actvCellLst[actvCellIdx]->cellId)
+ if((duCb.actvCellLst[actvCellIdx]) && (macCellCfgCfm->cellId == duCb.actvCellLst[actvCellIdx]->cellId))
{
duCb.actvCellLst[actvCellIdx]->duMacCellCfg = NULLP;
}
return RFAILED;
}
- for(uint8_t id = 0; id < duCb.numActvCells; id++)
+ for(uint8_t id = 0; id < MAX_NUM_CELL; id++)
{
if(duCb.actvCellLst[id])
{
- cellId->cellId = duCb.actvCellLst[id]->cellId;
+ cellId->cellId = duCb.actvCellLst[id]->cellId;
- /* Fill Pst */
- FILL_PST_DUAPP_TO_MAC(pst, EVENT_MAC_CELL_START);
+ /* Fill Pst */
+ FILL_PST_DUAPP_TO_MAC(pst, EVENT_MAC_CELL_START);
- return (*packMacCellStartOpts[pst.selector])(&pst, cellId);
+ return (*packMacCellStartOpts[pst.selector])(&pst, cellId);
}
}
return ROK;
if(duGetCellCb(ulRrcMsgInfo->cellId, &cellCb) != ROK)
return RFAILED;
- if(ulRrcMsgInfo->ueIdx > 0)
+ if(ulRrcMsgInfo->ueId > 0)
{
- ueCb = cellCb->ueCb[ulRrcMsgInfo->ueIdx -1];
+ ueCb = cellCb->ueCb[ulRrcMsgInfo->ueId -1];
- BuildAndSendULRRCMessageTransfer(ueCb, ulRrcMsgInfo->lcId, ulRrcMsgInfo->msgLen, \
- ulRrcMsgInfo->rrcMsg);
+ BuildAndSendULRRCMessageTransfer(ueCb, ulRrcMsgInfo->lcId, ulRrcMsgInfo->msgLen, ulRrcMsgInfo->rrcMsg);
DU_FREE_SHRABL_BUF(pst->region, pst->pool, ulRrcMsgInfo->rrcMsg, ulRrcMsgInfo->msgLen);
DU_FREE_SHRABL_BUF(pst->region, pst->pool, ulRrcMsgInfo, sizeof(RlcUlRrcMsgInfo));
if(duGetCellCb(rrcDeliveryReport->cellId, &cellCb) != ROK)
return RFAILED;
- ueCb = cellCb->ueCb[rrcDeliveryReport->ueIdx -1];
+ ueCb = cellCb->ueCb[rrcDeliveryReport->ueId -1];
ret = BuildAndSendRrcDeliveryReport(ueCb.gnbCuUeF1apId, ueCb.gnbDuUeF1apId,rrcDeliveryReport);
DU_FREE_SHRABL_BUF(pst->region, pst->pool, rrcDeliveryReport, sizeof(RrcDeliveryReport));
* ****************************************************************/
uint8_t DuProcRlcUlUserDataTrans(Pst *pst, RlcUlUserDatInfo *ulUserData)
{
- uint8_t rbIdx;
+ uint8_t teIdx = 0;
EgtpMsg egtpMsg;
Buffer *mBuf;
egtpMsg.msgHdr.extHdr.pdcpNmb.pres = FALSE;
/* Fetch EGTP tunnel info */
- for(rbIdx = 0; rbIdx < duCb.numDrb; rbIdx++)
+ for(teIdx = 0; teIdx < duCb.numTeId; teIdx++)
{
- if((duCb.upTnlCfg[rbIdx] != NULLP) && (duCb.upTnlCfg[rbIdx]->ueIdx == ulUserData->ueIdx) && \
- (duCb.upTnlCfg[rbIdx]->drbId == ulUserData->rbId))
+ /*TODO: If multiple Cell Support is enables then CellId also needs to be validated alongwith ueId and DrbId*/
+ if((duCb.upTnlCfg[teIdx] != NULLP) && (duCb.upTnlCfg[teIdx]->ueId == ulUserData->ueId) && \
+ (duCb.upTnlCfg[teIdx]->drbId == ulUserData->rbId))
{
- if(duCb.upTnlCfg[rbIdx]->tnlCfg1)
+ if(duCb.upTnlCfg[teIdx]->tnlCfg1)
{
- egtpMsg.msgHdr.teId = duCb.upTnlCfg[rbIdx]->tnlCfg1->teId; /*As we are supporting only 1 tunnel per DRB*/
+ egtpMsg.msgHdr.teId = duCb.upTnlCfg[teIdx]->tnlCfg1->teId; /*As we are supporting only 1 tunnel per DRB*/
break;
}
}
}
DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, cfgRsp, sizeof(MacSliceCfgRsp));
}
- return ROK;
}
/*******************************************************************
duFreeSliceCfgRsp(pst, cfgRsp);
}
duFreeTempSliceCfg();
+ return ROK;
}
/*******************************************************************
**********************************************************************/
uint8_t DuProcMacSliceReCfgRsp(Pst *pst, MacSliceCfgRsp *reCfgRsp)
{
- uint8_t cfgIdx = 0, sliceIdx =0;
-
+ uint8_t cfgIdx = 0;
+
if(reCfgRsp)
{
if(reCfgRsp->listOfSliceCfgRsp)
for(sliceRecord = 0; sliceRecord < sliceStats->numSlice; sliceRecord++)
{
- DU_LOG("\nINFO --> DU_APP: SliceIndx:%d, DlTput %.5lf, UlTput:%.5lf", sliceStats->sliceRecord[sliceRecord].networkSliceIdentifier,\
- sliceStats->sliceRecord[sliceRecord].ThpDl, sliceStats->sliceRecord[sliceRecord].ThpUl);
+ DU_LOG("\nINFO --> DU_APP: SliceId[SST-SD]:%d-%d, DlTput %.5lf, UlTput:%.5lf", sliceStats->sliceRecord[sliceRecord].networkSliceIdentifier.sst,\
+ sliceStats->sliceRecord[sliceRecord].networkSliceIdentifier.sd,sliceStats->sliceRecord[sliceRecord].ThpDl,\
+ sliceStats->sliceRecord[sliceRecord].ThpUl);
}
-/*TODO: Uncomment when PM O1 gerrit gets ready*/
-#if 0
#ifdef O1_ENABLE
if(sliceStats)
{
- sendSliceMetric(sliceStats);
+ sendSliceMetric((SliceMetricList*) sliceStats);
}
-#endif
#endif
DU_FREE_SHRABL_BUF(pst->region, pst->pool,sliceStats->sliceRecord, (sliceStats->numSlice) * (sizeof(SlicePm)));