memcpy(rlcUeCfg->snssai, duRlcUeCfg->snssai, sizeof(Snssai));
}
fillEntModeAndDir(&rlcUeCfg->entMode, &rlcUeCfg->dir, duRlcUeCfg->rlcMode);
- rlcUeCfg->cfgType = duRlcUeCfg->configType;
switch(rlcUeCfg->entMode)
{
* Function : fillRlcCfg
*
* Functionality:
- * fills LC Cfgs to be Add/Mod/Del in RLC
+ * fills LC Cfgs to be Add in RLC
*
* @params[in]
* RlcEntCfgInfo pointer
rlcUeCfg->ueId = ueCfg->ueId;
rlcUeCfg->cellId = ueCfg->cellId;
- rlcUeCfg->numEnt = ueCfg->numLcs;
+ rlcUeCfg->numEnt = ueCfg->numLcsToAdd;
rlcUeCfg->transId = getTransId();
-
for(lcIdx = 0; lcIdx < rlcUeCfg->numEnt; lcIdx++)
{
- if(fillLcCfg(gCb, &rlcUeCfg->entCfg[lcIdx], &ueCfg->rlcLcCfg[lcIdx]) != ROK)
+ if(fillLcCfg(gCb, &rlcUeCfg->entCfg[lcIdx], &ueCfg->rlcLcCfgAdd[lcIdx]) != ROK)
{
DU_LOG("\nERROR --> RLC : fillRlcCfg(): Failed to fill LC configuration");
return RFAILED;
}
+ rlcUeCfg->entCfg[lcIdx].cfgType = CONFIG_ADD;
+ }
+ return ROK;
+}
+
+/*******************************************************************
+ *
+ * @brief updates LC Cfgs to be Added/Mod/Rel in RLC
+ *
+ * @details
+ *
+ * Function : updateRlcCfg
+ *
+ * Functionality:
+ * updates LC Cfgs to be Add/Mod/Del in RLC
+ *
+ * @params[in]
+ * RlcEntCfgInfo pointer
+ * RlcBearerCfg pointer
+ * @return ROK - Success
+ * RFAILED - Failure
+ *
+ ******************************************************************/
+
+uint8_t updateRlcCfg(RlcCb *gCb, RlcCfgInfo *rlcUeCfg, RlcUeRecfg *ueRecfg)
+{
+ uint8_t lcIdx = 0;
+
+ rlcUeCfg->ueId = ueRecfg->ueId;
+ rlcUeCfg->cellId = ueRecfg->cellId;
+ rlcUeCfg->transId = getTransId();
+
+ rlcUeCfg->numEnt = 0;
+ for(lcIdx = 0; lcIdx < ueRecfg->numLcsToAdd; lcIdx++)
+ {
+ if(fillLcCfg(gCb, &rlcUeCfg->entCfg[rlcUeCfg->numEnt], &ueRecfg->rlcLcCfgAdd[lcIdx]) != ROK)
+ {
+ DU_LOG("\nERROR --> RLC : fillRlcCfg(): Failed to fill LC configuration");
+ return RFAILED;
+ }
+ rlcUeCfg->entCfg[rlcUeCfg->numEnt].cfgType = CONFIG_ADD;
+ rlcUeCfg->numEnt++;
+ }
+ for(lcIdx = 0; lcIdx < ueRecfg->numLcsToMod; lcIdx++)
+ {
+ if(fillLcCfg(gCb, &rlcUeCfg->entCfg[rlcUeCfg->numEnt], &ueRecfg->rlcLcCfgMod[lcIdx]) != ROK)
+ {
+ DU_LOG("\nERROR --> RLC : fillRlcCfg(): Failed to fill LC configuration");
+ return RFAILED;
+ }
+ rlcUeCfg->entCfg[rlcUeCfg->numEnt].cfgType = CONFIG_MOD;
+ rlcUeCfg->numEnt++;
+ }
+ for(lcIdx = 0; lcIdx < ueRecfg->numLcsToRel; lcIdx++)
+ {
+ if(fillLcCfg(gCb, &rlcUeCfg->entCfg[rlcUeCfg->numEnt], &ueRecfg->rlcLcCfgRel[lcIdx]) != ROK)
+ {
+ DU_LOG("\nERROR --> RLC : fillRlcCfg(): Failed to fill LC configuration");
+ return RFAILED;
+ }
+ rlcUeCfg->entCfg[rlcUeCfg->numEnt].cfgType = CONFIG_DEL;
+ rlcUeCfg->numEnt++;
}
return ROK;
}
cfgRsp->ueId = ueCfg->ueId;
cfgRsp->cellId = ueCfg->cellId;
- cfgRsp->numEnt = ueCfg->numLcs;
- for(cfgIdx =0; cfgIdx<ueCfg->numLcs; cfgIdx++)
+ cfgRsp->numEnt = ueCfg->numLcsToAdd;
+ for(cfgIdx =0; cfgIdx<ueCfg->numLcsToAdd; cfgIdx++)
{
- cfgRsp->entCfgCfm[cfgIdx].rbId = ueCfg->rlcLcCfg[cfgIdx].rbId;
- cfgRsp->entCfgCfm[cfgIdx].rbType = ueCfg->rlcLcCfg[cfgIdx].rbType;
+ cfgRsp->entCfgCfm[cfgIdx].rbId = ueCfg->rlcLcCfgAdd[cfgIdx].rbId;
+ cfgRsp->entCfgCfm[cfgIdx].rbType = ueCfg->rlcLcCfgAdd[cfgIdx].rbType;
cfgRsp->entCfgCfm[cfgIdx].status.status = RLC_DU_APP_RSP_NOK;
cfgRsp->entCfgCfm[cfgIdx].status.reason = CKW_CFG_REAS_NONE;
}
}
+
+/*******************************************************************
+ *
+ * @brief Fill RlcCfgCfmInfo structure for sending failure response to DU
+ *
+ * @details
+ *
+ * Function : fillRlcRecfgFailureRsp
+ *
+ * Functionality:
+ * Fill RlcCfgCfmInfo structure for sending failure response to DU
+ *
+ * @params[in] RlcCfgCfmInfo *cfgRsp, RlcUeCfg *ueCfg
+ *
+ * @return void
+ *
+ * ****************************************************************/
+void fillRlcRecfgFailureRsp(RlcCfgCfmInfo *cfgRsp, RlcUeRecfg *ueRecfg)
+{
+ uint8_t cfgIdx =0;
+
+ cfgRsp->ueId = ueRecfg->ueId;
+ cfgRsp->cellId = ueRecfg->cellId;
+ cfgRsp->numEnt = 0;
+ for(cfgIdx =0; cfgIdx<ueRecfg->numLcsToAdd; cfgIdx++)
+ {
+ cfgRsp->entCfgCfm[cfgRsp->numEnt].rbId = ueRecfg->rlcLcCfgAdd[cfgIdx].rbId;
+ cfgRsp->entCfgCfm[cfgRsp->numEnt].rbType = ueRecfg->rlcLcCfgAdd[cfgIdx].rbType;
+ cfgRsp->entCfgCfm[cfgRsp->numEnt].status.status = RLC_DU_APP_RSP_NOK;
+ cfgRsp->entCfgCfm[cfgRsp->numEnt].status.reason = CKW_CFG_REAS_NONE;
+ cfgRsp->numEnt++;
+ }
+ for(cfgIdx =0; cfgIdx<ueRecfg->numLcsToMod; cfgIdx++)
+ {
+ cfgRsp->entCfgCfm[cfgRsp->numEnt].rbId = ueRecfg->rlcLcCfgMod[cfgIdx].rbId;
+ cfgRsp->entCfgCfm[cfgRsp->numEnt].rbType = ueRecfg->rlcLcCfgMod[cfgIdx].rbType;
+ cfgRsp->entCfgCfm[cfgRsp->numEnt].status.status = RLC_DU_APP_RSP_NOK;
+ cfgRsp->entCfgCfm[cfgRsp->numEnt].status.reason = CKW_CFG_REAS_NONE;
+ cfgRsp->numEnt++;
+ }
+ for(cfgIdx =0; cfgIdx<ueRecfg->numLcsToRel; cfgIdx++)
+ {
+ cfgRsp->entCfgCfm[cfgRsp->numEnt].rbId = ueRecfg->rlcLcCfgRel[cfgIdx].rbId;
+ cfgRsp->entCfgCfm[cfgRsp->numEnt].rbType = ueRecfg->rlcLcCfgRel[cfgIdx].rbType;
+ cfgRsp->entCfgCfm[cfgRsp->numEnt].status.status = RLC_DU_APP_RSP_NOK;
+ cfgRsp->entCfgCfm[cfgRsp->numEnt].status.reason = CKW_CFG_REAS_NONE;
+ cfgRsp->numEnt++;
+ }
+}
+
/*******************************************************************
*
* @brief Handles Ue Create Request from DU APP
bool dLchPduPres; /* PDU received on dedicated logical channel */
RguLchDatInd dLchData[MAX_NUM_LC]; /* PDU info on dedicated logical channel */
RguDDatIndInfo *dLchUlDat; /* UL data on dedicated logical channel */
- RguCDatIndInfo *cLchUlDat; /* UL data on common logical channel */
/* Initializing dedicated logical channel Database */
DU_LOG("\nDEBUG --> RLC: Received UL Data request from MAC");
uint8_t ret = ROK;
uint8_t idx; /* Iterator */
uint8_t nmbDLch = 0; /* Number of dedicated logical channles */
- RguCStaIndInfo *cLchSchInfo; /* Common logical channel scheduling result */
RguDStaIndInfo *dLchSchInfo; /* Dedicated logical channel scheduling result */
DU_LOG("\nDEBUG --> RLC : Received scheduling report from MAC");
* RFAILED - failure
*
* ****************************************************************/
-uint8_t RlcProcUeReconfigReq(Pst *pst, RlcUeCfg *ueCfg)
+uint8_t RlcProcUeReconfigReq(Pst *pst, RlcUeRecfg *ueRecfg)
{
uint8_t ret = ROK;
RlcCfgInfo *rlcUeCfg = NULLP; //Seed code Rlc cfg struct
RlcCfgCfmInfo cfgRsp;
Pst rspPst;
- DU_LOG("\nDEBUG --> RLC: UE reconfig request received. CellID[%d] UEID[%d]",ueCfg->cellId, ueCfg->ueId);
+ DU_LOG("\nDEBUG --> RLC: UE reconfig request received. CellID[%d] UEID[%d]",ueRecfg->cellId, ueRecfg->ueId);
rlcUeCb = RLC_GET_RLCCB(pst->dstInst);
RLC_ALLOC(rlcUeCb, rlcUeCfg, sizeof(RlcCfgInfo));
else
{
memset(rlcUeCfg, 0, sizeof(RlcCfgInfo));
- ret = fillRlcCfg(rlcUeCb, rlcUeCfg, ueCfg);
+ ret = updateRlcCfg(rlcUeCb, rlcUeCfg, ueRecfg);
if(ret != ROK)
{
DU_LOG("\nERROR --> RLC: Failed to fill configuration at RlcProcUeReconfigReq()");
FILL_PST_RLC_TO_DUAPP(rspPst, RLC_UL_INST, EVENT_RLC_UE_RECONFIG_RSP);
- fillRlcCfgFailureRsp(&cfgRsp, ueCfg);
+ fillRlcRecfgFailureRsp(&cfgRsp, ueRecfg);
SendRlcUeCfgRspToDu(&rspPst, &cfgRsp);
}
else
}
}
- RLC_FREE_SHRABL_BUF(pst->region, pst->pool, ueCfg, sizeof(RlcUeCfg));
+ RLC_FREE_SHRABL_BUF(pst->region, pst->pool, ueRecfg, sizeof(RlcUeRecfg));
return ret;
}
* RFAILED - failure
*
* ****************************************************************/
-uint8_t packDuRlcUeReconfigReq(Pst *pst, RlcUeCfg *ueCfg)
+uint8_t packDuRlcUeReconfigReq(Pst *pst, RlcUeRecfg *ueRecfg)
{
Buffer *mBuf = NULLP;
return RFAILED;
}
/* pack the address of the structure */
- CMCHKPK(oduPackPointer,(PTR)ueCfg, mBuf);
+ CMCHKPK(oduPackPointer,(PTR)ueRecfg, mBuf);
}
else
{
{
if(pst->selector == ODU_SELECTOR_LWLC)
{
- RlcUeCfg *ueCfg;
+ RlcUeRecfg *ueRecfg;
/* unpack the address of the structure */
- CMCHKUNPK(oduUnpackPointer, (PTR *)&ueCfg, mBuf);
+ CMCHKUNPK(oduUnpackPointer, (PTR *)&ueRecfg, mBuf);
ODU_PUT_MSG_BUF(mBuf);
- return (*func)(pst, ueCfg);
+ return (*func)(pst, ueRecfg);
}
else
{
/* Spec Ref: 38.331, 6.3.2 RLC-BearerConfig */
typedef struct rlcBearerCfg
{
- ConfigType configType;
uint8_t rbId;
RlcRbType rbType;
uint8_t lcId;
bool isLcAddModRspSent;
}RlcBearerCfg;
+typedef struct rlcUeRecfg
+{
+ uint16_t cellId;
+ uint8_t ueId;
+ uint8_t numLcsToAdd;
+ RlcBearerCfg rlcLcCfgAdd[MAX_NUM_LC];
+ uint8_t numLcsToMod;
+ RlcBearerCfg rlcLcCfgMod[MAX_NUM_LC];
+ uint8_t numLcsToRel;
+ RlcBearerCfg rlcLcCfgRel[MAX_NUM_LC];
+}RlcUeRecfg;
+
typedef struct rlcUeCfg
{
- uint16_t cellId;
- uint8_t ueId;
- uint8_t numLcs;
- RlcBearerCfg rlcLcCfg[MAX_NUM_LC];
- UeCfgState rlcUeCfgState; /* InActive / Completed */
+ uint16_t cellId;
+ uint8_t ueId;
+ uint8_t numLcsToAdd;
+ RlcBearerCfg rlcLcCfgAdd[MAX_NUM_LC];
}RlcUeCfg;
typedef struct rlcUeCfgRsp
/* UE Reconfig Request from DU APP to RLC */
typedef uint8_t (*DuRlcUeReconfigReq) ARGS((
Pst *pst,
- RlcUeCfg *ueCfg ));
+ RlcUeRecfg *ueRecfg ));
/* UE Delete Request from DU APP to RLC */
typedef uint8_t (*DuRlcUeDeleteReq) ARGS((
uint8_t unpackDlRrcMsgToRlc(DuDlRrcMsgToRlcFunc func, Pst *pst, Buffer *mBuf);
uint8_t packRrcDeliveryReportToDu(Pst *pst, RrcDeliveryReport *rrcDeliveryReport);
uint8_t unpackRrcDeliveryReportToDu(RlcRrcDeliveryReportToDuFunc func,Pst *pst, Buffer *mBuf);
-uint8_t packDuRlcUeReconfigReq(Pst *pst, RlcUeCfg *ueCfg);
+uint8_t packDuRlcUeReconfigReq(Pst *pst, RlcUeRecfg *ueCfg);
uint8_t unpackRlcUeReconfigReq(DuRlcUeReconfigReq func, Pst *pst, Buffer *mBuf);
uint8_t packRlcDlRrcMsgRspToDu(Pst *pst, RlcDlRrcMsgRsp *dlRrcMsgRsp);
uint8_t unpackRlcDlRrcMsgRspToDu(RlcDlRrcMsgRspToDuFunc func, Pst *pst, Buffer *mBuf);
uint8_t DuProcRlcUlRrcMsgTrans(Pst *pst, RlcUlRrcMsgInfo *ulRrcMsgInfo);
uint8_t RlcProcDlRrcMsgTransfer(Pst *pst, RlcDlRrcMsgInfo *dlRrcMsgInfo);
uint8_t DuProcRlcRrcDeliveryReport(Pst *pst, RrcDeliveryReport *rrcDeliveryReport);
-uint8_t RlcProcUeReconfigReq(Pst *pst, RlcUeCfg *ueCfg);
+uint8_t RlcProcUeReconfigReq(Pst *pst, RlcUeRecfg *ueCfg);
uint8_t DuProcRlcDlRrcMsgRsp(Pst *pst, RlcDlRrcMsgRsp *dlRrcMsg);
uint8_t DuProcRlcUlUserDataTrans(Pst *pst, RlcUlUserDatInfo *ulUserData);
uint8_t RlcProcDlUserDataTransfer(Pst *pst, RlcDlUserDataInfo *dlDataMsgInfo);
{
if(duCb.actvCellLst[cellIdx] != NULLP)
{
- numLcs = duCb.actvCellLst[cellIdx]->ueCb[ueIdx].rlcUeCfg.numLcs;
+ numLcs = duCb.actvCellLst[cellIdx]->ueCb[ueIdx].duRlcUeCfg.numLcs;
for(lcIdx = 0; lcIdx < numLcs; lcIdx++)
{
- if(duCb.actvCellLst[cellIdx]->ueCb[ueIdx].rlcUeCfg.rlcLcCfg[lcIdx].rbId == drbId && \
- duCb.actvCellLst[cellIdx]->ueCb[ueIdx].rlcUeCfg.rlcLcCfg[lcIdx].rbType == RB_TYPE_DRB)
+ if(duCb.actvCellLst[cellIdx]->ueCb[ueIdx].duRlcUeCfg.rlcLcCfg[lcIdx].rlcBearerCfg.rbId == drbId && \
+ duCb.actvCellLst[cellIdx]->ueCb[ueIdx].duRlcUeCfg.rlcLcCfg[lcIdx].rlcBearerCfg.rbType == RB_TYPE_DRB)
{
- lcId = duCb.actvCellLst[cellIdx]->ueCb[ueIdx].rlcUeCfg.rlcLcCfg[lcIdx].lcId;
+ lcId = duCb.actvCellLst[cellIdx]->ueCb[ueIdx].duRlcUeCfg.rlcLcCfg[lcIdx].rlcBearerCfg.lcId;
return lcId;
}
}
if(ueCb == NULLP)
elementCnt = 1;
else if(ueCb->f1UeDb->actionType == UE_CTXT_CFG_QUERY)
- elementCnt = ueCb->rlcUeCfg.numLcs;
+ elementCnt = ueCb->duRlcUeCfg.numLcs;
else
{
- for(lcIdx = 0; lcIdx<ueCb->rlcUeCfg.numLcs; lcIdx++)
+ for(lcIdx = 0; lcIdx<ueCb->duRlcUeCfg.numLcs; lcIdx++)
{
- if(ueCb->rlcUeCfg.rlcLcCfg[lcIdx].isLcAddModRspSent == false)
+ if(ueCb->duRlcUeCfg.rlcLcCfg[lcIdx].rlcBearerCfg.isLcAddModRspSent == false)
elementCnt++;
}
}
else
{
idx=0;
- for(lcIdx=0; lcIdx<ueCb->rlcUeCfg.numLcs; lcIdx++)
+ for(lcIdx=0; lcIdx<ueCb->duRlcUeCfg.numLcs; lcIdx++)
{
- if((ueCb->f1UeDb->actionType != UE_CTXT_CFG_QUERY) && (ueCb->rlcUeCfg.rlcLcCfg[lcIdx].isLcAddModRspSent == true))
+ if((ueCb->f1UeDb->actionType != UE_CTXT_CFG_QUERY) && (ueCb->duRlcUeCfg.rlcLcCfg[lcIdx].rlcBearerCfg.isLcAddModRspSent == true))
continue;
/* Fill Logical channel identity */
- rlcBearerList->list.array[idx]->logicalChannelIdentity = ueCb->rlcUeCfg.rlcLcCfg[lcIdx].lcId;
+ rlcBearerList->list.array[idx]->logicalChannelIdentity = ueCb->duRlcUeCfg.rlcLcCfg[lcIdx].rlcBearerCfg.lcId;
/* Fill Radio Bearer Id and type (DRB/SRB) for this logical channel */
DU_ALLOC(rlcBearerList->list.array[idx]->servedRadioBearer, sizeof(struct RLC_BearerConfig__servedRadioBearer));
return RFAILED;
}
rlcBearerList->list.array[idx]->servedRadioBearer->present = \
- covertRbTypeFromIntEnumToRrcEnum(ueCb->rlcUeCfg.rlcLcCfg[lcIdx].rbType);
+ covertRbTypeFromIntEnumToRrcEnum(ueCb->duRlcUeCfg.rlcLcCfg[lcIdx].rlcBearerCfg.rbType);
switch(rlcBearerList->list.array[idx]->servedRadioBearer->present)
{
case RLC_BearerConfig__servedRadioBearer_PR_srb_Identity:
- rlcBearerList->list.array[idx]->servedRadioBearer->choice.srb_Identity = ueCb->rlcUeCfg.rlcLcCfg[lcIdx].rbId;
+ rlcBearerList->list.array[idx]->servedRadioBearer->choice.srb_Identity = ueCb->duRlcUeCfg.rlcLcCfg[lcIdx].rlcBearerCfg.rbId;
break;
case RLC_BearerConfig__servedRadioBearer_PR_drb_Identity:
- rlcBearerList->list.array[idx]->servedRadioBearer->choice.drb_Identity = ueCb->rlcUeCfg.rlcLcCfg[lcIdx].rbId;
+ rlcBearerList->list.array[idx]->servedRadioBearer->choice.drb_Identity = ueCb->duRlcUeCfg.rlcLcCfg[lcIdx].rlcBearerCfg.rbId;
break;
case RLC_BearerConfig__servedRadioBearer_PR_NOTHING:
default:
break;
}
- ueCb->rlcUeCfg.rlcLcCfg[lcIdx].isLcAddModRspSent = true;
+ ueCb->duRlcUeCfg.rlcLcCfg[lcIdx].rlcBearerCfg.isLcAddModRspSent = true;
rlcBearerList->list.array[idx]->reestablishRLC = NULLP;
DU_LOG("\nERROR --> F1AP : Memory allocation failure in BuildRlcBearerToAddModList");
return RFAILED;
}
- if(BuildRlcConfig(&ueCb->rlcUeCfg.rlcLcCfg[lcIdx], rlcBearerList->list.array[idx]->rlc_Config) != ROK)
+ if(BuildRlcConfig(&ueCb->duRlcUeCfg.rlcLcCfg[lcIdx].rlcBearerCfg, rlcBearerList->list.array[idx]->rlc_Config) != ROK)
{
DU_LOG("\nERROR --> F1AP : BuildRlcConfig failed");
return RFAILED;
}
for(macLcIdx = 0; macLcIdx < ueCb->duMacUeCfg.numLcs; macLcIdx++)
{
- if(ueCb->duMacUeCfg.lcCfgList[macLcIdx].lcConfig.lcId == ueCb->rlcUeCfg.rlcLcCfg[lcIdx].lcId)
+ if(ueCb->duMacUeCfg.lcCfgList[macLcIdx].lcConfig.lcId == ueCb->duRlcUeCfg.rlcLcCfg[lcIdx].rlcBearerCfg.lcId)
{
if(BuildMacLCConfig(&ueCb->duMacUeCfg.lcCfgList[macLcIdx].lcConfig, rlcBearerList->list.array[idx]->mac_LogicalChannelConfig) != ROK)
{
{
for(lcIdx = 0; lcIdx < ueCfg->numRlcLcs; lcIdx++)
{
- freeRlcLcCfg(&ueCfg->rlcLcCfg[lcIdx]);
+ freeRlcLcCfg(&ueCfg->rlcLcCfg[lcIdx].rlcBearerCfg);
}
}
* ****************************************************************/
void procRlcLcCfg(uint8_t rbId, uint8_t lcId, uint8_t rbType, uint8_t rlcMode,\
- uint8_t configType, RLC_Config_t *f1RlcCfg, RlcBearerCfg *lcCfg, QoSInformation_t *qoSInformation)
+ uint8_t configType, RLC_Config_t *f1RlcCfg, DuRlcBearerCfg *lcCfg, QoSInformation_t *qoSInformation)
{
DRB_Information_t *drbInfo;
- lcCfg->rbId = rbId;
+ lcCfg->rlcBearerCfg.rbId = rbId;
lcCfg->configType = configType;
if(rbType == RB_TYPE_SRB)
{
- lcCfg->rbType = RB_TYPE_SRB;
- lcCfg->lcId = rbId;
- lcCfg->lcType = LCH_DCCH;
- lcCfg->rlcMode = RLC_AM;
+ lcCfg->rlcBearerCfg.rbType = RB_TYPE_SRB;
+ lcCfg->rlcBearerCfg.lcId = rbId;
+ lcCfg->rlcBearerCfg.lcType = LCH_DCCH;
+ lcCfg->rlcBearerCfg.rlcMode = RLC_AM;
}
else if(rbType == RB_TYPE_DRB)
{
- lcCfg->rbType = RB_TYPE_DRB;
- lcCfg->lcId = lcId;
- lcCfg->lcType = LCH_DTCH;
- lcCfg->rlcMode = rlcMode;
+ lcCfg->rlcBearerCfg.rbType = RB_TYPE_DRB;
+ lcCfg->rlcBearerCfg.lcId = lcId;
+ lcCfg->rlcBearerCfg.lcType = LCH_DTCH;
+ lcCfg->rlcBearerCfg.rlcMode = rlcMode;
}
if(f1RlcCfg) /* rlc mode config recived */
{
- extractRlcModeCfg(lcCfg->rlcMode, lcCfg, f1RlcCfg);
+ extractRlcModeCfg(lcCfg->rlcBearerCfg.rlcMode, &lcCfg->rlcBearerCfg, f1RlcCfg);
}
if(qoSInformation != NULLP)
{
QoSInformation_ExtIEs__value_PR_DRB_Information)
{
drbInfo = &qoSInformation->choice.choice_extension->value.choice.DRB_Information;
- if(extractDrbSnssaiCfg(&drbInfo->sNSSAI, &lcCfg->snssai) != ROK)
+ if(extractDrbSnssaiCfg(&drbInfo->sNSSAI, &lcCfg->rlcBearerCfg.snssai) != ROK)
{
DU_LOG("\nERROR --> DUAPP: Unable to extract Snssai information at procRlcLcCfg()");
return;
/* Filling RLC/MAC Config*/
memset(&ueCfgDb->macLcCfg[idx], 0, sizeof(DuLcCfg));
- memset(&ueCfgDb->rlcLcCfg[idx], 0, sizeof(RlcBearerCfg));
+ memset(&ueCfgDb->rlcLcCfg[idx], 0, sizeof(DuRlcBearerCfg));
procRlcLcCfg(rbId, lcId, rbType, rlcMode, CONFIG_UNKNOWN, f1RlcCfg, &(ueCfgDb->rlcLcCfg[idx]), NULLP);
if(procMacLcCfg(lcId, rbType, CONFIG_UNKNOWN, NULL, NULL, NULL, macUlLcCfg, &ueCfgDb->macLcCfg[idx], NULL) != ROK)
{
* @return void
*
* ****************************************************************/
-uint8_t procSrbListToSetup(SRBs_ToBeSetup_Item_t * srbItem, DuLcCfg *duMacLcToAdd, RlcBearerCfg *rlcLcToAdd)
+uint8_t procSrbListToSetup(SRBs_ToBeSetup_Item_t * srbItem, DuLcCfg *duMacLcToAdd, DuRlcBearerCfg *rlcLcToAdd)
{
/* Filling RLC INFO */
uint8_t ret = ROK, srbIdx = 0, rlcLcIdx = 0;
SRBs_ToBeSetup_Item_t *srbItem = NULLP;
DuLcCfg *macLcCtxt = NULLP;
- RlcBearerCfg *rlcLcCtxt = NULLP;
+ DuRlcBearerCfg *rlcLcCtxt = NULLP;
if(srbCfg)
{
for(rlcLcIdx = 0; rlcLcIdx < ueCfgDb->numMacLcs; rlcLcIdx++)
{
- if(ueCfgDb->rlcLcCfg[rlcLcIdx].rbId == srbItem->sRBID && ueCfgDb->rlcLcCfg[rlcLcIdx].rbType == RB_TYPE_SRB)
+ if(ueCfgDb->rlcLcCfg[rlcLcIdx].rlcBearerCfg.rbId == srbItem->sRBID && ueCfgDb->rlcLcCfg[rlcLcIdx].rlcBearerCfg.rbType == RB_TYPE_SRB)
{
macLcCtxt = &ueCfgDb->macLcCfg[rlcLcIdx];
rlcLcCtxt = &ueCfgDb->rlcLcCfg[rlcLcIdx];
}
if(!rlcLcCtxt)
{
- memset(&ueCfgDb->rlcLcCfg[ueCfgDb->numRlcLcs], 0, sizeof(RlcBearerCfg));
+ memset(&ueCfgDb->rlcLcCfg[ueCfgDb->numRlcLcs], 0, sizeof(DuRlcBearerCfg));
rlcLcCtxt = &ueCfgDb->rlcLcCfg[ueCfgDb->numRlcLcs];
ueCfgDb->numRlcLcs++;
}
* ****************************************************************/
uint8_t procDrbListToSetupMod(uint8_t lcId, DRBs_ToBeSetup_Item_t *drbItem,\
-DRBs_ToBeSetupMod_Item_t *drbSetupModItem, DRBs_ToBeModified_Item_t *drbModItem, DuLcCfg *macLcToAdd, RlcBearerCfg *rlcLcToAdd, UpTnlCfg *upTnlInfo, RlcUeCfg *storedRlcUeCfg)
+DRBs_ToBeSetupMod_Item_t *drbSetupModItem, DRBs_ToBeModified_Item_t *drbModItem, DuLcCfg *macLcToAdd, DuRlcBearerCfg *rlcLcToAdd, UpTnlCfg *upTnlInfo, DuRlcUeCfg *storedRlcUeCfg)
{
uint8_t cfgIdx = 0;
RlcMode rlcModeInfo;
{
for(cfgIdx = 0; cfgIdx < storedRlcUeCfg->numLcs; cfgIdx++)
{
- if(storedRlcUeCfg->rlcLcCfg[cfgIdx].lcId == lcId)
+ if(storedRlcUeCfg->rlcLcCfg[cfgIdx].rlcBearerCfg.lcId == lcId)
{
- rlcModeInfo = storedRlcUeCfg->rlcLcCfg[cfgIdx].rlcMode;
+ rlcModeInfo = storedRlcUeCfg->rlcLcCfg[cfgIdx].rlcBearerCfg.rlcMode;
break;
}
}
* ****************************************************************/
uint8_t extractDrbListToSetupMod(DRBs_ToBeSetup_List_t *drbCfg, DRBs_ToBeSetupMod_List_t *drbSetupModCfg,\
- DRBs_ToBeModified_List_t *drbModCfg, uint8_t drbCount, DuUeCfg *ueCfgDb, uint32_t *drbBitMap, RlcUeCfg *rlcUeCfg)
+ DRBs_ToBeModified_List_t *drbModCfg, uint8_t drbCount, DuUeCfg *ueCfgDb, uint32_t *drbBitMap, DuRlcUeCfg *rlcUeCfg)
{
uint8_t ret = ROK;
uint8_t drbIdx = 0, rlcLcIdx = 0;
DRBs_ToBeSetupMod_ItemIEs_t *drbSetupModItem = NULLP;
DRBs_ToBeModified_ItemIEs_t *drbModItem = NULLP;
DuLcCfg *macLcCtxt = NULLP;
- RlcBearerCfg *rlcLcCtxt = NULLP;
+ DuRlcBearerCfg *rlcLcCtxt = NULLP;
ret = ROK;
if(drbCount > 0)
for(rlcLcIdx = 0; rlcLcIdx < ueCfgDb->numRlcLcs; rlcLcIdx++)
{
- if(ueCfgDb->rlcLcCfg[rlcLcIdx].rbId == drbId && ueCfgDb->rlcLcCfg[rlcLcIdx].rbType == RB_TYPE_DRB)
+ if(ueCfgDb->rlcLcCfg[rlcLcIdx].rlcBearerCfg.rbId == drbId && \
+ ueCfgDb->rlcLcCfg[rlcLcIdx].rlcBearerCfg.rbType == RB_TYPE_DRB)
{
macLcCtxt = &ueCfgDb->macLcCfg[rlcLcIdx];
rlcLcCtxt = &ueCfgDb->rlcLcCfg[rlcLcIdx];
*
* ****************************************************************/
-uint8_t extractDrbListToRelease(uint8_t ueId, DRBs_ToBeReleased_List_t *drbToRel, uint8_t drbCount, DuUeCfg *ueCfgDb, RlcUeCfg *rlcUeCfg)
+uint8_t extractDrbListToRelease(uint8_t ueId, DRBs_ToBeReleased_List_t *drbToRel, uint8_t drbCount, DuUeCfg *ueCfgDb, DuRlcUeCfg *rlcUeCfg)
{
uint8_t ret = ROK, teIdx = 0;
uint8_t drbIdx = 0, rlcLcIdx = 0;
uint8_t drbId = 0, lcId = 0;
DRBs_ToBeReleased_ItemIEs_t *drbRelItem = NULLP;
DuLcCfg *macLcCtxt = NULLP;
- RlcBearerCfg *rlcLcCtxt = NULLP;
+ DuRlcBearerCfg *rlcLcCtxt = NULLP;
ret = ROK;
if(drbCount > 0)
for(rlcLcIdx = 0; rlcLcIdx < ueCfgDb->numRlcLcs; rlcLcIdx++)
{
- if(ueCfgDb->rlcLcCfg[rlcLcIdx].rbId == drbId && ueCfgDb->rlcLcCfg[rlcLcIdx].rbType == RB_TYPE_DRB)
+ if(ueCfgDb->rlcLcCfg[rlcLcIdx].rlcBearerCfg.rbId == drbId && ueCfgDb->rlcLcCfg[rlcLcIdx].rlcBearerCfg.rbType == RB_TYPE_DRB)
{
macLcCtxt = &ueCfgDb->macLcCfg[rlcLcIdx];
rlcLcCtxt = &ueCfgDb->rlcLcCfg[rlcLcIdx];
}
if(!rlcLcCtxt)
{
- memset(&ueCfgDb->rlcLcCfg[ueCfgDb->numRlcLcs], 0, sizeof(RlcBearerCfg));
+ memset(&ueCfgDb->rlcLcCfg[ueCfgDb->numRlcLcs], 0, sizeof(DuRlcBearerCfg));
rlcLcCtxt = &ueCfgDb->rlcLcCfg[ueCfgDb->numRlcLcs];
ueCfgDb->numRlcLcs++;
}
}
/* Filling RLC INFO */
- procRlcLcCfg(drbId, lcId, RB_TYPE_DRB, rlcLcCtxt->rlcMode, CONFIG_DEL, NULL, rlcLcCtxt, NULLP);
+ procRlcLcCfg(drbId, lcId, RB_TYPE_DRB, rlcLcCtxt->rlcBearerCfg.rlcMode, CONFIG_DEL, NULL, rlcLcCtxt, NULLP);
/* Filling MAC INFO */
if(procMacLcCfg(lcId, RB_TYPE_DRB, CONFIG_DEL, NULL, NULL, NULL, NULL, macLcCtxt, NULLP) != ROK)
{
srbItemIe->id = ProtocolIE_ID_id_SRBs_SetupMod_Item;
srbItemIe->criticality = Criticality_reject;
srbItemIe->value.present = SRBs_SetupMod_ItemIEs__value_PR_SRBs_SetupMod_Item;
- srbItemIe->value.choice.SRBs_SetupMod_Item.sRBID = ueCfg->rlcLcCfg[srbIdx].rbId;
- srbItemIe->value.choice.SRBs_SetupMod_Item.lCID = ueCfg->rlcLcCfg[srbIdx].lcId;
+ srbItemIe->value.choice.SRBs_SetupMod_Item.sRBID = ueCfg->rlcLcCfg[srbIdx].rlcBearerCfg.rbId;
+ srbItemIe->value.choice.SRBs_SetupMod_Item.lCID = ueCfg->rlcLcCfg[srbIdx].rlcBearerCfg.lcId;
}
return ROK;
}
ueContextModifyRes->protocolIEs.list.array[ieIdx]->criticality = Criticality_reject;
ueContextModifyRes->protocolIEs.list.array[ieIdx]->value.present = \
UEContextModificationResponseIEs__value_PR_SRBs_SetupMod_List;
- for(rbIdx = 0; rbIdx < ueCb->rlcUeCfg.numLcs; rbIdx++)
+ for(rbIdx = 0; rbIdx < ueCb->duRlcUeCfg.numLcs; rbIdx++)
{
- if(ueCb->rlcUeCfg.rlcLcCfg[rbIdx].rbType == RB_TYPE_SRB)
+ if(ueCb->duRlcUeCfg.rlcLcCfg[rbIdx].rlcBearerCfg.rbType == RB_TYPE_SRB)
{
- memcpy(&ueCb->f1UeDb->duUeCfg.rlcLcCfg[ueCb->f1UeDb->duUeCfg.numRlcLcs++], &ueCb->rlcUeCfg.rlcLcCfg[rbIdx],\
- sizeof(RlcBearerCfg));
+ memcpy(&ueCb->f1UeDb->duUeCfg.rlcLcCfg[ueCb->f1UeDb->duUeCfg.numRlcLcs++], &ueCb->duRlcUeCfg.rlcLcCfg[rbIdx],\
+ sizeof(DuRlcBearerCfg));
}
}
ret = BuildSrbSetupModList(&ueContextModifyRes->protocolIEs.list.array[ieIdx]->value.choice.SRBs_SetupMod_List, \
drbModifiedCfg = &ueContextModifyReq->protocolIEs.list.array[ieIdx]->value.\
choice.DRBs_ToBeModified_List;
if(extractDrbListToSetupMod(NULL, NULL, drbModifiedCfg, drbModifiedCfg->list.count,\
- &duUeCb->f1UeDb->duUeCfg, &duUeCb->drbBitMap, &duUeCb->rlcUeCfg))
+ &duUeCb->f1UeDb->duUeCfg, &duUeCb->drbBitMap, &duUeCb->duRlcUeCfg))
{
DU_LOG("\nERROR --> DU APP : Failed at extractDrbListToSetupMod() for DrbModifiedList");
ret = RFAILED;
drbToRelease = &ueContextModifyReq->protocolIEs.list.array[ieIdx]->value.\
choice.DRBs_ToBeReleased_List;
if(extractDrbListToRelease(gnbDuUeF1apId, drbToRelease, drbToRelease->list.count,\
- &duUeCb->f1UeDb->duUeCfg, &duUeCb->rlcUeCfg))
+ &duUeCb->f1UeDb->duUeCfg, &duUeCb->duRlcUeCfg))
{
DU_LOG("\nERROR --> DU APP : Failed at extractDrbListToSetupMod() for DrbModifiedList");
ret = RFAILED;
#endif
}DuMacUeCfg;
+typedef struct duRlcBearerCfg
+{
+ ConfigType configType;
+ RlcBearerCfg rlcBearerCfg;
+}DuRlcBearerCfg;
+
+typedef struct duRlcUeCfg
+{
+ uint16_t cellId;
+ uint8_t ueId;
+ uint8_t numLcs;
+ DuRlcBearerCfg rlcLcCfg[MAX_NUM_LC];
+ UeCfgState rlcUeCfgState; /* InActive / Completed */
+}DuRlcUeCfg;
+
+
typedef struct duUeCfg
{
void *cellGrpCfg;
void *ueNrCapability;
uint8_t numRlcLcs; /* Rlc Ue Cfg */
- RlcBearerCfg rlcLcCfg[MAX_NUM_LC];
+ DuRlcBearerCfg rlcLcCfg[MAX_NUM_LC];
uint8_t numMacLcs; /* Mac Ue Cfg */
DuLcCfg macLcCfg[MAX_NUM_LC];
AmbrCfg *ambrCfg;
UeState ueState; /* UE Active/ Ue Inactive state */
MacCfraResource cfraResource; /* CF-RA resource assigned by MAC/SCH */
DuMacUeCfg duMacUeCfg; /* Mac Ue Cfg */
- RlcUeCfg rlcUeCfg; /* Rlc Ue Cfg */
+ DuRlcUeCfg duRlcUeCfg; /* Rlc Ue Cfg */
}DuUeCb;
typedef struct slotInfo
* RFAILED - failure
*
* ****************************************************************/
-uint8_t duBuildAndSendDlRrcMsgToRlc(uint16_t cellId, RlcUeCfg ueCfg, F1DlRrcMsg *f1DlRrcMsg)
+uint8_t duBuildAndSendDlRrcMsgToRlc(uint16_t cellId, DuRlcUeCfg ueCfg, F1DlRrcMsg *f1DlRrcMsg)
{
Pst pst;
uint8_t ret;
dlRrcMsgInfo->ueId = ueCfg.ueId;
for(lcIdx = 0; lcIdx <= MAX_NUM_LC; lcIdx++)
{
- if(ueCfg.rlcLcCfg[lcIdx].lcId == f1DlRrcMsg->srbId)
+ if(ueCfg.rlcLcCfg[lcIdx].rlcBearerCfg.lcId == f1DlRrcMsg->srbId)
{
dlRrcMsgInfo->lcId = f1DlRrcMsg->srbId;
break;
{
ueFound = true;
ret = duBuildAndSendDlRrcMsgToRlc(duCb.actvCellLst[cellIdx]->cellId, \
- duCb.actvCellLst[cellIdx]->ueCb[ueIdx].rlcUeCfg, dlRrcMsg);
+ duCb.actvCellLst[cellIdx]->ueCb[ueIdx].duRlcUeCfg, dlRrcMsg);
if(ret == RFAILED)
{
DU_LOG("\nERROR --> DU_APP: duBuildAndSendDlRrcMsgToRlc() Failed for UE ID:%d", dlRrcMsg->gnbDuUeF1apId);
*
*****************************************************************/
-uint8_t fillRlcSrb1LcCfg(RlcBearerCfg *rlcLcCfg)
+uint8_t fillRlcSrb1LcCfg(DuRlcBearerCfg *rlcLcCfg)
{
uint8_t ret = ROK;
- rlcLcCfg->rbId = SRB1_LCID;
- rlcLcCfg->rbType = RB_TYPE_SRB;
- rlcLcCfg->lcId = SRB1_LCID;
- rlcLcCfg->lcType = LCH_DCCH;
- rlcLcCfg->rlcMode = RLC_AM;
+ rlcLcCfg->rlcBearerCfg.rbId = SRB1_LCID;
+ rlcLcCfg->rlcBearerCfg.rbType = RB_TYPE_SRB;
+ rlcLcCfg->rlcBearerCfg.lcId = SRB1_LCID;
+ rlcLcCfg->rlcBearerCfg.lcType = LCH_DCCH;
+ rlcLcCfg->rlcBearerCfg.rlcMode = RLC_AM;
rlcLcCfg->configType = CONFIG_ADD;
- ret = fillDefaultRlcModeCfg(rlcLcCfg->rlcMode, rlcLcCfg);
- rlcLcCfg->isLcAddModRspSent = true;
+ ret = fillDefaultRlcModeCfg(rlcLcCfg->rlcBearerCfg.rlcMode, &rlcLcCfg->rlcBearerCfg);
+ rlcLcCfg->rlcBearerCfg.isLcAddModRspSent = true;
return ret;
}
*
*****************************************************************/
-uint8_t sendUeRecfgReqToRlc(RlcUeCfg *rlcUeCfg)
+uint8_t sendUeRecfgReqToRlc(RlcUeRecfg *rlcUeRecfg)
{
uint8_t ret;
Pst pst;
FILL_PST_DUAPP_TO_RLC(pst, RLC_UL_INST, EVENT_RLC_UE_RECONFIG_REQ);
- if(rlcUeCfg)
+ if(rlcUeRecfg)
{
/* Processing one Ue at a time to RLC */
DU_LOG("\nDEBUG --> DU_APP: Sending Ue Reconfig Request to RLC UL");
- ret = (*packRlcUeReconfigReqOpts[pst.selector])(&pst, rlcUeCfg);
+ ret = (*packRlcUeReconfigReqOpts[pst.selector])(&pst, rlcUeRecfg);
if(ret == RFAILED)
{
DU_LOG("\nERROR --> DU_APP : Failed to send Ue Reconfig Req to RLC at sendUeRecfgReqToRlc()");
- DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, rlcUeCfg, sizeof(RlcUeCfg));
+ DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, rlcUeRecfg, sizeof(RlcUeRecfg));
}
}
else
*
* @details
*
- * Function : fillRlcUeCfg
+ * Function : updateRlcUeCfg
*
* Functionality: Fills Rlc Bearer Cfg
*
*
*****************************************************************/
-uint8_t fillRlcUeCfg(uint16_t cellId, uint8_t duUeF1apId, DuUeCfg *ueCfgDb, RlcUeCfg *rlcUeCfg)
+uint8_t updateRlcUeCfg(uint16_t cellId, uint8_t duUeF1apId, DuUeCfg *ueCfgDb, DuRlcUeCfg *rlcUeCfg)
{
uint8_t ret, dbIdx, lcIdx, cellIdx;
bool lcIdFound = false;
- RlcUeCfg *duRlcDb = NULLP;
+ DuRlcUeCfg *duRlcDb = NULLP;
ret = ROK;
rlcUeCfg->cellId = cellId;
if(ret == ROK)
rlcUeCfg->numLcs++;
else
- memset(rlcUeCfg, 0, sizeof(RlcUeCfg));
+ memset(rlcUeCfg, 0, sizeof(DuRlcUeCfg));
}
else
{
/* Fetch RlcDb from DuUeCb */
GET_CELL_IDX(cellId, cellIdx);
- duRlcDb = &duCb.actvCellLst[cellIdx]->ueCb[rlcUeCfg->ueId-1].rlcUeCfg;
+ duRlcDb = &duCb.actvCellLst[cellIdx]->ueCb[rlcUeCfg->ueId-1].duRlcUeCfg;
duRlcDb->rlcUeCfgState = UE_CFG_INPROGRESS;
for(dbIdx = 0; (dbIdx < ueCfgDb->numRlcLcs && ret == ROK); dbIdx++)
{
- ret = fillDefaultRlcModeCfg(ueCfgDb->rlcLcCfg[dbIdx].rlcMode, &ueCfgDb->rlcLcCfg[dbIdx]);
+ ret = fillDefaultRlcModeCfg(ueCfgDb->rlcLcCfg[dbIdx].rlcBearerCfg.rlcMode, &ueCfgDb->rlcLcCfg[dbIdx].rlcBearerCfg);
if(ret == RFAILED)
{
DU_LOG("\n ERROR --> DU APP : Failed to fill Rlc Mode at fillRlcUeCfg()");
- memset(rlcUeCfg, 0, sizeof(RlcUeCfg));
+ memset(rlcUeCfg, 0, sizeof(DuRlcUeCfg));
return ret;
}
/* Fill Rlc Ue Cfg List for ADD/MOD/DEL */
for(lcIdx = 0; lcIdx < duRlcDb->numLcs; lcIdx++)
{
- if(ueCfgDb->rlcLcCfg[dbIdx].lcId == duRlcDb->rlcLcCfg[lcIdx].lcId)
+ if(ueCfgDb->rlcLcCfg[dbIdx].rlcBearerCfg.lcId == duRlcDb->rlcLcCfg[lcIdx].rlcBearerCfg.lcId)
{
lcIdFound = true;
if((ueCfgDb->rlcLcCfg[dbIdx].configType == CONFIG_UNKNOWN)||
{
/* MOD */
ueCfgDb->rlcLcCfg[dbIdx].configType = CONFIG_MOD; /* update Db for MOD type */
- memcpy(&rlcUeCfg->rlcLcCfg[dbIdx], &ueCfgDb->rlcLcCfg[dbIdx], sizeof(RlcBearerCfg));
- fillSnssaiInfo(rlcUeCfg->rlcLcCfg[dbIdx].snssai, ueCfgDb->rlcLcCfg[dbIdx].snssai,\
- &duRlcDb->rlcLcCfg[lcIdx].snssai,false);
+ memcpy(&rlcUeCfg->rlcLcCfg[dbIdx], &ueCfgDb->rlcLcCfg[dbIdx], sizeof(DuRlcBearerCfg));
+ fillSnssaiInfo(rlcUeCfg->rlcLcCfg[dbIdx].rlcBearerCfg.snssai, ueCfgDb->rlcLcCfg[dbIdx].rlcBearerCfg.snssai,\
+ &duRlcDb->rlcLcCfg[lcIdx].rlcBearerCfg.snssai,false);
}
}
else
if(!lcIdFound)
{
/* ADD/ DEL Config Type */
- memcpy(&rlcUeCfg->rlcLcCfg[dbIdx], &ueCfgDb->rlcLcCfg[dbIdx], sizeof(RlcBearerCfg));
- fillSnssaiInfo(rlcUeCfg->rlcLcCfg[dbIdx].snssai, ueCfgDb->rlcLcCfg[dbIdx].snssai, NULL, false);
+ memcpy(&rlcUeCfg->rlcLcCfg[dbIdx], &ueCfgDb->rlcLcCfg[dbIdx], sizeof(DuRlcBearerCfg));
+ fillSnssaiInfo(rlcUeCfg->rlcLcCfg[dbIdx].rlcBearerCfg.snssai, ueCfgDb->rlcLcCfg[dbIdx].rlcBearerCfg.snssai, NULL, false);
}
rlcUeCfg->numLcs++;
}
DU_LOG("\nERROR --> DU APP : Failed to send UE create request to MAC");
/* Filling Rlc Ue Config */
- memset(&duCb.actvCellLst[cellIdx]->ueCb[ueIdx].rlcUeCfg, 0, sizeof(RlcUeCfg));
+ memset(&duCb.actvCellLst[cellIdx]->ueCb[ueIdx].duRlcUeCfg, 0, sizeof(DuRlcUeCfg));
ret = duBuildAndSendUeCreateReqToRlc(ueCcchCtxt->cellId, ueCcchCtxt->gnbDuUeF1apId, NULL,
- &duCb.actvCellLst[cellIdx]->ueCb[ueIdx].rlcUeCfg);
+ &duCb.actvCellLst[cellIdx]->ueCb[ueIdx].duRlcUeCfg);
if(ret == RFAILED)
DU_LOG("\nERROR --> DU APP : Failed to send UE create request to RLC");
}
}
+/**********************************************************************************
+ *
+ * @brief Fills Ue Cfg from DU DB to RLCUeCfg
+ *
+ * @details
+ *
+ * Function : fillRlcUeCfg
+ *
+ * Functionality: fills ue Cfg to be sent to RLC
+ *
+ * @params[in] DuRlcUeCfg Pointer
+ * RlcUeCfg Pointer
+ *
+ * @return ROK - success
+ * RFAILED - failure
+ * *******************************************************************************/
+void fillRlcUeCfg(DuRlcUeCfg *duRlcUeCfg, RlcUeCfg *rlcUeCfg)
+{
+ uint8_t lcIdx = 0;
+
+ rlcUeCfg->cellId = duRlcUeCfg->cellId;
+ rlcUeCfg->ueId = duRlcUeCfg->ueId;
+
+ rlcUeCfg->numLcsToAdd = 0;
+ for(lcIdx = 0; lcIdx < duRlcUeCfg->numLcs; lcIdx++)
+ {
+ if(duRlcUeCfg->rlcLcCfg[lcIdx].configType == CONFIG_ADD)
+ {
+ memcpy(&rlcUeCfg->rlcLcCfgAdd[rlcUeCfg->numLcsToAdd], &duRlcUeCfg->rlcLcCfg[lcIdx].rlcBearerCfg, sizeof(RlcBearerCfg));
+ rlcUeCfg->numLcsToAdd++;
+ }
+ }
+ return;
+}
+
/******************************************************************
*
* @brief Builds and Send UE Create Request to MAC
*
*****************************************************************/
-uint8_t fillRlcCfgToAddMod(RlcBearerCfg *lcCfg, RlcBearerCfg *f1UeDbLcCfg)
+uint8_t fillRlcCfgToAddMod(DuRlcBearerCfg *lcCfg, DuRlcBearerCfg *f1UeDbLcCfg)
{
lcCfg->configType = f1UeDbLcCfg->configType;
- lcCfg->rbId = f1UeDbLcCfg->rbId;
- lcCfg->rbType = f1UeDbLcCfg->rbType;
- lcCfg->lcId = f1UeDbLcCfg->lcId;
- lcCfg->lcType = f1UeDbLcCfg->lcType;
- lcCfg->rlcMode = f1UeDbLcCfg->rlcMode;
+ lcCfg->rlcBearerCfg.rbId = f1UeDbLcCfg->rlcBearerCfg.rbId;
+ lcCfg->rlcBearerCfg.rbType = f1UeDbLcCfg->rlcBearerCfg.rbType;
+ lcCfg->rlcBearerCfg.lcId = f1UeDbLcCfg->rlcBearerCfg.lcId;
+ lcCfg->rlcBearerCfg.lcType = f1UeDbLcCfg->rlcBearerCfg.lcType;
+ lcCfg->rlcBearerCfg.rlcMode = f1UeDbLcCfg->rlcBearerCfg.rlcMode;
- switch(lcCfg->rlcMode)
+ switch(lcCfg->rlcBearerCfg.rlcMode)
{
case RLC_AM :
{
- if(!lcCfg->u.amCfg)
+ if(!lcCfg->rlcBearerCfg.u.amCfg)
{
- DU_ALLOC_SHRABL_BUF(lcCfg->u.amCfg, sizeof(AmBearerCfg));
- if(!lcCfg->u.amCfg)
+ DU_ALLOC_SHRABL_BUF(lcCfg->rlcBearerCfg.u.amCfg, sizeof(AmBearerCfg));
+ if(!lcCfg->rlcBearerCfg.u.amCfg)
return RFAILED;
}
/* DL AM */
- lcCfg->u.amCfg->dlAmCfg.snLenDl = f1UeDbLcCfg->u.amCfg->dlAmCfg.snLenDl;
- lcCfg->u.amCfg->dlAmCfg.pollRetxTmr = f1UeDbLcCfg->u.amCfg->dlAmCfg.pollRetxTmr;
- lcCfg->u.amCfg->dlAmCfg.pollPdu = f1UeDbLcCfg->u.amCfg->dlAmCfg.pollPdu;
- lcCfg->u.amCfg->dlAmCfg.pollByte = f1UeDbLcCfg->u.amCfg->dlAmCfg.pollByte;
- lcCfg->u.amCfg->dlAmCfg.maxRetxTh = f1UeDbLcCfg->u.amCfg->dlAmCfg.maxRetxTh;
+ lcCfg->rlcBearerCfg.u.amCfg->dlAmCfg.snLenDl = f1UeDbLcCfg->rlcBearerCfg.u.amCfg->dlAmCfg.snLenDl;
+ lcCfg->rlcBearerCfg.u.amCfg->dlAmCfg.pollRetxTmr = f1UeDbLcCfg->rlcBearerCfg.u.amCfg->dlAmCfg.pollRetxTmr;
+ lcCfg->rlcBearerCfg.u.amCfg->dlAmCfg.pollPdu = f1UeDbLcCfg->rlcBearerCfg.u.amCfg->dlAmCfg.pollPdu;
+ lcCfg->rlcBearerCfg.u.amCfg->dlAmCfg.pollByte = f1UeDbLcCfg->rlcBearerCfg.u.amCfg->dlAmCfg.pollByte;
+ lcCfg->rlcBearerCfg.u.amCfg->dlAmCfg.maxRetxTh = f1UeDbLcCfg->rlcBearerCfg.u.amCfg->dlAmCfg.maxRetxTh;
/* UL AM */
- lcCfg->u.amCfg->ulAmCfg.snLenUl = f1UeDbLcCfg->u.amCfg->ulAmCfg.snLenUl;
- lcCfg->u.amCfg->ulAmCfg.reAssemTmr = f1UeDbLcCfg->u.amCfg->ulAmCfg.reAssemTmr;
- lcCfg->u.amCfg->ulAmCfg.statProhTmr = f1UeDbLcCfg->u.amCfg->ulAmCfg.statProhTmr;
+ lcCfg->rlcBearerCfg.u.amCfg->ulAmCfg.snLenUl = f1UeDbLcCfg->rlcBearerCfg.u.amCfg->ulAmCfg.snLenUl;
+ lcCfg->rlcBearerCfg.u.amCfg->ulAmCfg.reAssemTmr = f1UeDbLcCfg->rlcBearerCfg.u.amCfg->ulAmCfg.reAssemTmr;
+ lcCfg->rlcBearerCfg.u.amCfg->ulAmCfg.statProhTmr = f1UeDbLcCfg->rlcBearerCfg.u.amCfg->ulAmCfg.statProhTmr;
break;
}
case RLC_UM_BI_DIRECTIONAL :
{
- if(!lcCfg->u.umBiDirCfg)
+ if(!lcCfg->rlcBearerCfg.u.umBiDirCfg)
{
- DU_ALLOC_SHRABL_BUF(lcCfg->u.umBiDirCfg, sizeof(UmBiDirBearerCfg));
- if(!lcCfg->u.umBiDirCfg)
+ DU_ALLOC_SHRABL_BUF(lcCfg->rlcBearerCfg.u.umBiDirCfg, sizeof(UmBiDirBearerCfg));
+ if(!lcCfg->rlcBearerCfg.u.umBiDirCfg)
return RFAILED;
}
/* UL UM BI DIR INFO */
- lcCfg->u.umBiDirCfg->ulUmCfg.snLenUlUm = f1UeDbLcCfg->u.umBiDirCfg->ulUmCfg.snLenUlUm;
- lcCfg->u.umBiDirCfg->ulUmCfg.reAssemTmr = f1UeDbLcCfg->u.umBiDirCfg->ulUmCfg.reAssemTmr;
+ lcCfg->rlcBearerCfg.u.umBiDirCfg->ulUmCfg.snLenUlUm = f1UeDbLcCfg->rlcBearerCfg.u.umBiDirCfg->ulUmCfg.snLenUlUm;
+ lcCfg->rlcBearerCfg.u.umBiDirCfg->ulUmCfg.reAssemTmr = f1UeDbLcCfg->rlcBearerCfg.u.umBiDirCfg->ulUmCfg.reAssemTmr;
/* DL UM BI DIR INFO */
- lcCfg->u.umBiDirCfg->dlUmCfg.snLenDlUm = f1UeDbLcCfg->u.umBiDirCfg->dlUmCfg.snLenDlUm;
+ lcCfg->rlcBearerCfg.u.umBiDirCfg->dlUmCfg.snLenDlUm = f1UeDbLcCfg->rlcBearerCfg.u.umBiDirCfg->dlUmCfg.snLenDlUm;
break;
}
case RLC_UM_UNI_DIRECTIONAL_UL :
{
- if(!lcCfg->u.umUniDirUlCfg)
+ if(!lcCfg->rlcBearerCfg.u.umUniDirUlCfg)
{
- DU_ALLOC_SHRABL_BUF(lcCfg->u.umUniDirUlCfg, sizeof(UmUniDirUlBearerCfg));
- if(!lcCfg->u.umUniDirUlCfg)
+ DU_ALLOC_SHRABL_BUF(lcCfg->rlcBearerCfg.u.umUniDirUlCfg, sizeof(UmUniDirUlBearerCfg));
+ if(!lcCfg->rlcBearerCfg.u.umUniDirUlCfg)
return RFAILED;
}
- lcCfg->u.umUniDirUlCfg->ulUmCfg.snLenUlUm = f1UeDbLcCfg->u.umUniDirUlCfg->ulUmCfg.snLenUlUm;
- lcCfg->u.umUniDirUlCfg->ulUmCfg.reAssemTmr = f1UeDbLcCfg->u.umUniDirUlCfg->ulUmCfg.reAssemTmr;
+ lcCfg->rlcBearerCfg.u.umUniDirUlCfg->ulUmCfg.snLenUlUm = f1UeDbLcCfg->rlcBearerCfg.u.umUniDirUlCfg->ulUmCfg.snLenUlUm;
+ lcCfg->rlcBearerCfg.u.umUniDirUlCfg->ulUmCfg.reAssemTmr = f1UeDbLcCfg->rlcBearerCfg.u.umUniDirUlCfg->ulUmCfg.reAssemTmr;
break;
}
case RLC_UM_UNI_DIRECTIONAL_DL :
{
- if(!lcCfg->u.umUniDirDlCfg)
+ if(!lcCfg->rlcBearerCfg.u.umUniDirDlCfg)
{
- DU_ALLOC_SHRABL_BUF(lcCfg->u.umUniDirDlCfg, sizeof(UmUniDirDlBearerCfg));
- if(!lcCfg->u.umUniDirDlCfg)
+ DU_ALLOC_SHRABL_BUF(lcCfg->rlcBearerCfg.u.umUniDirDlCfg, sizeof(UmUniDirDlBearerCfg));
+ if(!lcCfg->rlcBearerCfg.u.umUniDirDlCfg)
return RFAILED;
}
- lcCfg->u.umUniDirDlCfg->dlUmCfg.snLenDlUm = f1UeDbLcCfg->u.umUniDirDlCfg->dlUmCfg.snLenDlUm;
+ lcCfg->rlcBearerCfg.u.umUniDirDlCfg->dlUmCfg.snLenDlUm = f1UeDbLcCfg->rlcBearerCfg.u.umUniDirDlCfg->dlUmCfg.snLenDlUm;
break;
}
default:
- DU_LOG("\nERROR --> DU_APP: Invalid Rlc Mode %d at fillRlcCfgToAddMod()", lcCfg->rlcMode);
+ DU_LOG("\nERROR --> DU_APP: Invalid Rlc Mode %d at fillRlcCfgToAddMod()", lcCfg->rlcBearerCfg.rlcMode);
return RFAILED;
}
return ROK;
*
* ****************************************************************/
-uint8_t duUpdateRlcLcCfg(RlcUeCfg *rlcUeCfg, F1UeContextSetupDb *f1UeDb)
+uint8_t duUpdateRlcLcCfg(DuRlcUeCfg *rlcUeCfg, F1UeContextSetupDb *f1UeDb)
{
uint8_t ret, lcIdx, dbIdx, numLcs, lcDelIdx;
numLcs = rlcUeCfg->numLcs;
for(lcIdx = 0; lcIdx < numLcs; lcIdx++)
{
- if(f1UeDb->duUeCfg.rlcLcCfg[dbIdx].lcId == rlcUeCfg->rlcLcCfg[lcIdx].lcId)
+ if(f1UeDb->duUeCfg.rlcLcCfg[dbIdx].rlcBearerCfg.lcId == rlcUeCfg->rlcLcCfg[lcIdx].rlcBearerCfg.lcId)
{
if(f1UeDb->duUeCfg.rlcLcCfg[dbIdx].configType == CONFIG_MOD)
{
DU_LOG("\nERROR --> DU APP : Failed to modify LC at Idx %d in duUpdateRlcCfg()", lcDelIdx);
break;
}
- fillSnssaiInfo(NULL, f1UeDb->duUeCfg.rlcLcCfg[dbIdx].snssai, &rlcUeCfg->rlcLcCfg[lcIdx].snssai, true);
+ fillSnssaiInfo(NULL, f1UeDb->duUeCfg.rlcLcCfg[dbIdx].rlcBearerCfg.snssai,\
+ &rlcUeCfg->rlcLcCfg[lcIdx].rlcBearerCfg.snssai, true);
}
else if(f1UeDb->duUeCfg.rlcLcCfg[dbIdx].configType == CONFIG_DEL)
{
/* Free memory at matched lcIdx index */
- freeRlcLcCfg(&rlcUeCfg->rlcLcCfg[lcIdx]);
+ freeRlcLcCfg(&rlcUeCfg->rlcLcCfg[lcIdx].rlcBearerCfg);
rlcUeCfg->numLcs--;
for(lcDelIdx = lcIdx; lcDelIdx < rlcUeCfg->numLcs; lcDelIdx++)
{
ret = fillRlcCfgToAddMod(&rlcUeCfg->rlcLcCfg[lcDelIdx], &rlcUeCfg->rlcLcCfg[lcDelIdx+1]);
- fillSnssaiInfo(NULL, rlcUeCfg->rlcLcCfg[lcDelIdx+1].snssai, &rlcUeCfg->rlcLcCfg[lcDelIdx].snssai,\
- true);
- freeRlcLcCfg(&rlcUeCfg->rlcLcCfg[lcDelIdx+1]);
+ fillSnssaiInfo(NULL, rlcUeCfg->rlcLcCfg[lcDelIdx+1].rlcBearerCfg.snssai,\
+ &rlcUeCfg->rlcLcCfg[lcDelIdx].rlcBearerCfg.snssai, true);
+ freeRlcLcCfg(&rlcUeCfg->rlcLcCfg[lcDelIdx+1].rlcBearerCfg);
if(ret == RFAILED)
{
DU_LOG("\nERROR --> DU APP : Failed to delete LC at Idx %d in duUpdateRlcCfg()", lcDelIdx);
ret = fillRlcCfgToAddMod(&rlcUeCfg->rlcLcCfg[lcIdx], &f1UeDb->duUeCfg.rlcLcCfg[dbIdx]);
if(ret == ROK)
{
- fillSnssaiInfo(NULL, f1UeDb->duUeCfg.rlcLcCfg[dbIdx].snssai, &rlcUeCfg->rlcLcCfg[ rlcUeCfg->numLcs].snssai,\
- true);
+ fillSnssaiInfo(NULL, f1UeDb->duUeCfg.rlcLcCfg[dbIdx].rlcBearerCfg.snssai,\
+ &rlcUeCfg->rlcLcCfg[rlcUeCfg->numLcs].rlcBearerCfg.snssai, true);
rlcUeCfg->numLcs++;
}
}
ueCb = &duCb.actvCellLst[cellIdx]->ueCb[ueId-1];
/*Filling RLC Ue Cfg */
- ueCb->rlcUeCfg.cellId = cellId;
- ueCb->rlcUeCfg.ueId = ueId;
- ret = duUpdateRlcLcCfg(&ueCb->rlcUeCfg, ueCb->f1UeDb);
+ ueCb->duRlcUeCfg.cellId = cellId;
+ ueCb->duRlcUeCfg.ueId = ueId;
+ ret = duUpdateRlcLcCfg(&ueCb->duRlcUeCfg, ueCb->f1UeDb);
if(ret == ROK)
{
/*Filling MAC Ue Cfg */
if((duCb.actvCellLst[cfgRsp->cellId -1]->ueCb[cfgRsp->ueId -1].ueState == UE_HANDIN_IN_PROGRESS) &&
(duCb.actvCellLst[cfgRsp->cellId -1]->ueCb[cfgRsp->ueId -1].duMacUeCfg.macUeCfgState == UE_CREATE_COMPLETE) &&
- (duCb.actvCellLst[cfgRsp->cellId -1]->ueCb[cfgRsp->ueId -1].rlcUeCfg.rlcUeCfgState == UE_CREATE_COMPLETE))
+ (duCb.actvCellLst[cfgRsp->cellId -1]->ueCb[cfgRsp->ueId -1].duRlcUeCfg.rlcUeCfgState == UE_CREATE_COMPLETE))
{
if((ret = duUpdateDuUeCbCfg(cfgRsp->ueId, cfgRsp->cellId)) == ROK)
{
{
duCb.actvCellLst[cellIdx]->ueCb[reCfgRsp->ueId -1].duMacUeCfg.macUeCfgState = UE_RECFG_COMPLETE;
if((duCb.actvCellLst[cellIdx]->ueCb[reCfgRsp->ueId -1].duMacUeCfg.macUeCfgState == UE_RECFG_COMPLETE) &&
- (duCb.actvCellLst[reCfgRsp->cellId -1]->ueCb[reCfgRsp->ueId -1].rlcUeCfg.rlcUeCfgState == UE_RECFG_COMPLETE))
+ (duCb.actvCellLst[reCfgRsp->cellId -1]->ueCb[reCfgRsp->ueId -1].duRlcUeCfg.rlcUeCfgState == UE_RECFG_COMPLETE))
{
if((ret = duUpdateDuUeCbCfg(reCfgRsp->ueId, reCfgRsp->cellId)) == ROK)
{
*
*****************************************************************/
-uint8_t duBuildAndSendUeCreateReqToRlc(uint16_t cellId, uint8_t gnbDuUeF1apId, DuUeCfg *ueCfgDb, RlcUeCfg *duRlcUeCfg)
+uint8_t duBuildAndSendUeCreateReqToRlc(uint16_t cellId, uint8_t gnbDuUeF1apId, DuUeCfg *ueCfgDb, DuRlcUeCfg *duRlcUeCfg)
{
uint8_t ret = ROK;
RlcUeCfg *rlcUeCfg = NULLP;
Pst pst;
- ret = fillRlcUeCfg(cellId, gnbDuUeF1apId, ueCfgDb, duRlcUeCfg);
+ ret = updateRlcUeCfg(cellId, gnbDuUeF1apId, ueCfgDb, duRlcUeCfg);
if(ret == RFAILED)
{
DU_LOG("\nERROR --> DU APP : Failed to fill Rlc Ue Cfg at duBuildAndSendUeCreateReqToRlc()");
if(rlcUeCfg)
{
memset(rlcUeCfg, 0, sizeof(RlcUeCfg));
- memcpy(rlcUeCfg, duRlcUeCfg, sizeof(RlcUeCfg));
+ fillRlcUeCfg(duRlcUeCfg, rlcUeCfg);
+
/* Processing one Ue at a time to RLC */
DU_LOG("\nDEBUG --> DU_APP: Sending UE create request to RLC UL");
ret = (*packRlcUeCreateReqOpts[pst.selector])(&pst, rlcUeCfg);
if(pst->event == EVENT_RLC_UE_CREATE_RSP)
{
DU_LOG("\nINFO --> DU_APP: RLC UE Create Response : SUCCESS [UE IDX:%d]", cfgRsp->ueId);
- duCb.actvCellLst[cfgRsp->cellId -1]->ueCb[cfgRsp->ueId -1].rlcUeCfg.rlcUeCfgState = UE_CREATE_COMPLETE;
+ duCb.actvCellLst[cfgRsp->cellId -1]->ueCb[cfgRsp->ueId -1].duRlcUeCfg.rlcUeCfgState = UE_CREATE_COMPLETE;
if((duCb.actvCellLst[cfgRsp->cellId -1]->ueCb[cfgRsp->ueId -1].ueState == UE_HANDIN_IN_PROGRESS) &&
(duCb.actvCellLst[cfgRsp->cellId -1]->ueCb[cfgRsp->ueId -1].duMacUeCfg.macUeCfgState == UE_CREATE_COMPLETE) &&
- (duCb.actvCellLst[cfgRsp->cellId -1]->ueCb[cfgRsp->ueId -1].rlcUeCfg.rlcUeCfgState == UE_CREATE_COMPLETE))
+ (duCb.actvCellLst[cfgRsp->cellId -1]->ueCb[cfgRsp->ueId -1].duRlcUeCfg.rlcUeCfgState == UE_CREATE_COMPLETE))
{
if((ret = duUpdateDuUeCbCfg(cfgRsp->ueId, cfgRsp->cellId)) == ROK)
{
{
DU_LOG("\nINFO --> DU_APP: RLC UE Reconfig Response : SUCCESS [UE IDX:%d]", cfgRsp->ueId);
- duCb.actvCellLst[cfgRsp->cellId -1]->ueCb[cfgRsp->ueId -1].rlcUeCfg.rlcUeCfgState = UE_RECFG_COMPLETE;
+ duCb.actvCellLst[cfgRsp->cellId -1]->ueCb[cfgRsp->ueId -1].duRlcUeCfg.rlcUeCfgState = UE_RECFG_COMPLETE;
if((duCb.actvCellLst[cfgRsp->cellId -1]->ueCb[cfgRsp->ueId -1].duMacUeCfg.macUeCfgState == UE_RECFG_COMPLETE) &&
- (duCb.actvCellLst[cfgRsp->cellId -1]->ueCb[cfgRsp->ueId -1].rlcUeCfg.rlcUeCfgState == UE_RECFG_COMPLETE))
+ (duCb.actvCellLst[cfgRsp->cellId -1]->ueCb[cfgRsp->ueId -1].duRlcUeCfg.rlcUeCfgState == UE_RECFG_COMPLETE))
{
if((ret = duUpdateDuUeCbCfg(cfgRsp->ueId, cfgRsp->cellId)) == ROK)
{
return ret;
}
+/**********************************************************************************
+ *
+ * @brief Fills Ue ReCfg from DU DB to RlcUeRecfg
+ *
+ * @details
+ *
+ * Function : fillRlcUeRecfg
+ *
+ * Functionality: fills ue ReCfg to be sent to RLC
+ *
+ * @params[in] DuRlcUeCfg Pointer
+ * RlcUeRecfg Pointer
+ *
+ * @return void
+ * *******************************************************************************/
+void fillRlcUeRecfg(DuRlcUeCfg *duRlcUeCfg, RlcUeRecfg *rlcUeRecfg)
+{
+ uint8_t lcIdx = 0;
+
+ rlcUeRecfg->cellId = duRlcUeCfg->cellId;
+ rlcUeRecfg->ueId = duRlcUeCfg->ueId;
+
+
+ if(duRlcUeCfg->numLcs > 0)
+ {
+ rlcUeRecfg->numLcsToAdd = 0;
+ rlcUeRecfg->numLcsToMod = 0;
+ rlcUeRecfg->numLcsToRel = 0;
+
+ for(lcIdx = 0; lcIdx < duRlcUeCfg->numLcs; lcIdx++)
+ {
+ if(duRlcUeCfg->rlcLcCfg[lcIdx].configType == CONFIG_ADD)
+ {
+ memcpy(&rlcUeRecfg->rlcLcCfgAdd[rlcUeRecfg->numLcsToAdd], &duRlcUeCfg->rlcLcCfg[lcIdx].rlcBearerCfg, sizeof(RlcBearerCfg));
+ rlcUeRecfg->numLcsToAdd++;
+ }
+ if(duRlcUeCfg->rlcLcCfg[lcIdx].configType == CONFIG_MOD)
+ {
+ memcpy(&rlcUeRecfg->rlcLcCfgMod[rlcUeRecfg->numLcsToMod], &duRlcUeCfg->rlcLcCfg[lcIdx].rlcBearerCfg, sizeof(RlcBearerCfg));
+ rlcUeRecfg->numLcsToMod++;
+ }
+ if(duRlcUeCfg->rlcLcCfg[lcIdx].configType == CONFIG_DEL)
+ {
+ memcpy(&rlcUeRecfg->rlcLcCfgRel[rlcUeRecfg->numLcsToRel], &duRlcUeCfg->rlcLcCfg[lcIdx].rlcBearerCfg, sizeof(RlcBearerCfg));
+ rlcUeRecfg->numLcsToRel++;
+ }
+ }
+ }
+ return;
+}
+
/*******************************************************************
*
* @brief Builds and Send Ue Reconfig Req to RLC
uint8_t duBuildAndSendUeRecfgReqToRlc(uint8_t cellId, uint8_t gnbDuUeF1apId, uint8_t crnti, DuUeCfg *ueCfgDb)
{
uint8_t ret = ROK;
- RlcUeCfg *rlcUeCfg = NULLP;
+ DuRlcUeCfg *duRlcUeCfg = NULLP;
+ RlcUeRecfg *rlcUeRecfg = NULLP;
- DU_ALLOC_SHRABL_BUF(rlcUeCfg, sizeof(RlcUeCfg));
- if(rlcUeCfg)
+ DU_ALLOC(duRlcUeCfg, sizeof(DuRlcUeCfg));
+ DU_ALLOC_SHRABL_BUF(rlcUeRecfg, sizeof(RlcUeRecfg));
+ if(duRlcUeCfg && rlcUeRecfg)
{
- memset(rlcUeCfg, 0, sizeof(RlcUeCfg));
- ret = fillRlcUeCfg(cellId, gnbDuUeF1apId, ueCfgDb, rlcUeCfg);
+ memset(duRlcUeCfg, 0, sizeof(DuRlcUeCfg));
+ memset(rlcUeRecfg, 0, sizeof(RlcUeRecfg));
+
+ ret = updateRlcUeCfg(cellId, gnbDuUeF1apId, ueCfgDb, duRlcUeCfg);
+
if(ret == RFAILED)
DU_LOG("\nERROR --> DU APP : Failed at duBuildAndSendUeRecfgReqToRlc()");
else
- ret = sendUeRecfgReqToRlc(rlcUeCfg);
+ {
+ fillRlcUeRecfg(duRlcUeCfg, rlcUeRecfg);
+ ret = sendUeRecfgReqToRlc(rlcUeRecfg);
+ }
}
else
{
{
memset(duMacUeCfg, 0, sizeof(DuMacUeCfg));
memset(macUeRecfg, 0, sizeof(MacUeRecfg));
+
ret = updateDuMacUeCfg(cellId, duUeF1apId, crnti, ueCfgDb, duMacUeCfg);
- fillMacUeRecfg(duMacUeCfg, macUeRecfg);
if(ret == RFAILED)
DU_LOG("\nERROR --> DU APP : Failed to fill Mac Ue Cfg at duBuildAndSendUeRecfgReqToMac()");
else
+ {
+ fillMacUeRecfg(duMacUeCfg, macUeRecfg);
ret = sendUeRecfgReqToMac(macUeRecfg);
+ }
}
else
{
ret = RFAILED;
}
DU_FREE(duMacUeCfg, sizeof(DuMacUeCfg));
-
+
return ret;
}
if(ret == RFAILED)
DU_LOG("\nERROR --> DU APP : Failed to send UE create request to MAC");
- ret = duBuildAndSendUeCreateReqToRlc(cellId, ueCb->gnbDuUeF1apId, duUeCfg, &ueCb->rlcUeCfg);
+ ret = duBuildAndSendUeCreateReqToRlc(cellId, ueCb->gnbDuUeF1apId, duUeCfg, &ueCb->duRlcUeCfg);
if(ret == RFAILED)
DU_LOG("\nERROR --> DU APP : Failed to send UE create request to RLC");
if(ueCb->f1UeDb->dlRrcMsg->rrcMsgPdu)
{
/* Sending DL RRC Message to RLC */
- ret = duBuildAndSendDlRrcMsgToRlc(cellId, ueCb->rlcUeCfg, ueCb->f1UeDb->dlRrcMsg);
+ ret = duBuildAndSendDlRrcMsgToRlc(cellId, ueCb->duRlcUeCfg, ueCb->f1UeDb->dlRrcMsg);
if(ret == RFAILED)
{
DU_LOG("\nERROR --> DU APP : Failed to send DL RRC msg in duProcUeContextSetupRequest()");
if(ueCb->f1UeDb->dlRrcMsg->rrcMsgPdu)
{
/* Sending DL RRC Message to RLC */
- ret = duBuildAndSendDlRrcMsgToRlc(cellId, ueCb->rlcUeCfg, ueCb->f1UeDb->dlRrcMsg);
+ ret = duBuildAndSendDlRrcMsgToRlc(cellId, ueCb->duRlcUeCfg, ueCb->f1UeDb->dlRrcMsg);
if(ret == RFAILED)
{
DU_LOG("\nERROR --> DU APP : Failed to send DL RRC msg in duProcUeContextModReq()");
if(duCb.actvCellLst[cellIdx] != NULLP)
{
if((duCb.actvCellLst[cellIdx]->ueCb[ueId-1].duMacUeCfg.macUeCfgState == UE_DELETE_COMPLETE)\
- &&(duCb.actvCellLst[cellIdx]->ueCb[ueId-1].rlcUeCfg.rlcUeCfgState == UE_DELETE_COMPLETE))
+ &&(duCb.actvCellLst[cellIdx]->ueCb[ueId-1].duRlcUeCfg.rlcUeCfgState == UE_DELETE_COMPLETE))
{
ueCb = &duCb.actvCellLst[cellIdx]->ueCb[ueId-1];
deleteMacUeCfg(&ueCb->duMacUeCfg);
- deleteRlcUeCfg(&ueCb->rlcUeCfg);
+ deleteRlcUeCfg(&ueCb->duRlcUeCfg);
if(ueCb->f1UeDb !=NULLP)
{
freeF1UeDb(ueCb->f1UeDb);
DU_LOG("\nINFO --> DU_APP: RLC UE Delete Response : SUCCESS [UE IDX:%d]", ueId);
if(duCb.actvCellLst[cellIdx]!=NULLP)
{
- duCb.actvCellLst[cellIdx]->ueCb[ueId-1].rlcUeCfg.rlcUeCfgState = UE_DELETE_COMPLETE;
+ duCb.actvCellLst[cellIdx]->ueCb[ueId-1].duRlcUeCfg.rlcUeCfgState = UE_DELETE_COMPLETE;
GET_CRNTI(crnti, ueId);
if(sendUeDeleteReqToMac(delRsp->cellId, ueId, crnti) == RFAILED)
{
*
*****************************************************************/
-void deleteRlcUeCfg(RlcUeCfg *ueCfg)
+void deleteRlcUeCfg(DuRlcUeCfg *ueCfg)
{
uint8_t lcIdx = 0;
RlcBearerCfg *lcCfg= NULLP;
{
for(lcIdx =0 ; lcIdx < ueCfg->numLcs ; lcIdx++)
{
- lcCfg = &ueCfg->rlcLcCfg[lcIdx];
+ lcCfg = &ueCfg->rlcLcCfg[lcIdx].rlcBearerCfg;
switch(lcCfg->rlcMode)
{
case RLC_AM :
{
if(duUeCb->f1UeDb->dlRrcMsg->rrcMsgPdu != NULLP)
{
- ret = duBuildAndSendDlRrcMsgToRlc(cellId, duCb.actvCellLst[duUeCb->f1UeDb->cellIdx]->ueCb[ueId-1].rlcUeCfg,\
+ ret = duBuildAndSendDlRrcMsgToRlc(cellId, duCb.actvCellLst[duUeCb->f1UeDb->cellIdx]->ueCb[ueId-1].duRlcUeCfg,\
duUeCb->f1UeDb->dlRrcMsg);
if(ret == RFAILED)
{
uint8_t duHdlRlcUlData(Pst *pst, KwuDatIndInfo* datInd, Buffer *mBuf);
uint8_t cmPkRlcDatReq(Pst * pst,RlcDatReqInfo* datReq,Buffer * mBuf);
uint8_t duBuildAndSendUeCreateReqToMac(uint16_t cellId, uint8_t duUeF1apId, uint16_t crnti, DuUeCfg *ueCfgDb, DuMacUeCfg *duMacUeCfg);
-uint8_t duBuildAndSendUeCreateReqToRlc(uint16_t cellId, uint8_t duUeF1apId, DuUeCfg *ueCfgDb, RlcUeCfg *duRlcUeCfg);
+uint8_t duBuildAndSendUeCreateReqToRlc(uint16_t cellId, uint8_t duUeF1apId, DuUeCfg *ueCfgDb, DuRlcUeCfg *duRlcUeCfg);
uint8_t duCreateUeCb(UeCcchCtxt *ueCcchCtxt, uint32_t gnbCuUeF1apId);
uint8_t duProcUlCcchInd(UlCcchIndInfo *ulCcchIndInfo);
uint8_t duBuildAndSendUeDeleteReq(uint16_t cellId, uint16_t crnti);
-void deleteRlcUeCfg(RlcUeCfg *ueCfg);
+void deleteRlcUeCfg(DuRlcUeCfg *ueCfg);
void freeF1UeDb(F1UeContextSetupDb *f1UeDb);
uint8_t sendUeDeleteReqToMac(uint16_t cellId, uint8_t ueId, uint16_t crnti);
uint8_t sendUeDeleteReqToRlc(uint16_t cellId, uint8_t ueId);