* RFAILED - failure
*
* ****************************************************************/
-uint8_t MacProcRlcDlData(Pst* pstInfo, RlcData *dlData)
+uint8_t MacProcRlcDlData(Pst* pstInfo, RlcDlData *dlData)
{
uint8_t pduIdx = 0;
uint8_t ueId = 0;
}
if(pstInfo->selector == ODU_SELECTOR_LWLC)
{
- MAC_FREE_SHRABL_BUF(pstInfo->region, pstInfo->pool, dlData, sizeof(RlcData));
+ MAC_FREE_SHRABL_BUF(pstInfo->region, pstInfo->pool, dlData, sizeof(RlcDlData));
}
return ROK;
}
uint8_t lcId, uint16_t pduLen, uint8_t *pdu)
{
Pst pst;
- RlcData *ulData;
+ RlcUlData *ulData;
/* Filling RLC Ul Data*/
- MAC_ALLOC_SHRABL_BUF(ulData, sizeof(RlcData));
+ MAC_ALLOC_SHRABL_BUF(ulData, sizeof(RlcUlData));
if(!ulData)
{
DU_LOG("\nERROR --> MAC : Memory allocation failed while sending UL data to RLC");
return RFAILED;
}
- memset(ulData, 0, sizeof(RlcData));
+ memset(ulData, 0, sizeof(RlcUlData));
ulData->cellId = cellId;
ulData->rnti = rnti;
memcpy(&ulData->slotInfo, &slotInfo, sizeof(SlotTimingInfo));
ulData->slotInfo.cellId = cellId;
/* Filling pdu info */
- if(lcId != SRB0_LCID)
- ulData->pduInfo[ulData->numPdu].commCh = false;
- else
- ulData->pduInfo[ulData->numPdu].commCh = true;
-
ulData->pduInfo[ulData->numPdu].lcId = lcId;
ulData->pduInfo[ulData->numPdu].pduBuf = pdu;
ulData->pduInfo[ulData->numPdu].pduLen = pduLen;
{
schedRpt->lcSch[lcIdx].lcId = dlInfo.dlMsgAlloc[ueIdx]->dlMsgSchedInfo[schInfoIdx].lcSchInfo[lcIdx].lcId;
schedRpt->lcSch[lcIdx].bufSize = dlInfo.dlMsgAlloc[ueIdx]->dlMsgSchedInfo[schInfoIdx].lcSchInfo[lcIdx].schBytes;
- schedRpt->lcSch[lcIdx].commCh = false;
}
}
MAC_ALLOC(txPdu, txPduLen);
if(!txPdu)
{
- DU_LOG("\nERROR --> MAC : Memory allocation failed in MacProcRlcDlData");
+ DU_LOG("\nERROR --> MAC : Memory allocation failed in MacProcDlAlloc");
return RFAILED;
}
memcpy(txPdu, retxTb, txPduLen);
* RFAILED - failure
*
* ****************************************************************/
-uint8_t MacSendUlDataToRlc(Pst *pst, RlcData *ulData)
+uint8_t MacSendUlDataToRlc(Pst *pst, RlcUlData *ulData)
{
return (*rlcMacSendUlDataOpts[pst->selector])(pst, ulData);
}
uint8_t MacDuAppCellUpInd(Pst *pst, OduCellId *cellId);
uint8_t MacDuAppStopInd(Pst *pst, OduCellId *cellId);
uint8_t MacDuAppUlCcchInd(Pst *pst, UlCcchIndInfo *ulCcchIndInfo);
-uint8_t MacSendUlDataToRlc(Pst *pst, RlcData *ulData);
+uint8_t MacSendUlDataToRlc(Pst *pst, RlcUlData *ulData);
uint8_t MacSendSchedResultRptToRlc(Pst *pst, RlcSchedResultRpt *schedRpt);
uint8_t MacDuAppSlotInd(Pst *pst, SlotTimingInfo *slotIndInfo);
* RFAILED - failure
*
* ****************************************************************/
-uint8_t RlcSendDlDataToMac(Pst *pst, RlcData *dlData)
+uint8_t RlcSendDlDataToMac(Pst *pst, RlcDlData *dlData)
{
/* jump to specific primitive depending on configured selector */
return (*rlcMacSendDlDataOpts[pst->selector])(pst, dlData);
/* This file stores defines used at RLC lower mac interface */
uint8_t RlcSendBoStatusToMac(Pst *pst, RlcBoStatus *staRsp);
-uint8_t RlcSendDlDataToMac(Pst *pst, RlcData *dlData);
+uint8_t RlcSendDlDataToMac(Pst *pst, RlcDlData *dlData);
/**********************************************************************
End of file
return RFAILED;
}
- datReqInfo->rlcId.rbType = dlRrcMsgInfo->rbType;
- datReqInfo->rlcId.rbId = dlRrcMsgInfo->rbId;
+ datReqInfo->rlcId.rbType = RB_TYPE_SRB;
+ datReqInfo->rlcId.rbId = dlRrcMsgInfo->lcId;
datReqInfo->rlcId.ueId = dlRrcMsgInfo->ueId;
datReqInfo->rlcId.cellId = dlRrcMsgInfo->cellId;
- datReqInfo->lcType = dlRrcMsgInfo->lcType;
+ datReqInfo->lcType = LCH_DCCH;
datReqInfo->sduId = ++(rlcCb[pst->dstInst]->dlSduId);
/* Copy fixed buffer to message */
* RFAILED - failure
*
* ****************************************************************/
-uint8_t RlcProcUlData(Pst *pst, RlcData *ulData)
+uint8_t RlcProcUlData(Pst *pst, RlcUlData *ulData)
{
uint8_t ret = ROK;
uint8_t idx, pduIdx;
* and call common channel's handler */
for(idx = 0; idx< ulData->numPdu; idx++)
{
- if(ulData->pduInfo[idx].commCh)
+ if(!dLchPduPres)
{
- RLC_SHRABL_STATIC_BUF_ALLOC(RLC_MEM_REGION_UL, RLC_POOL, cLchUlDat, \
- sizeof(RguCDatIndInfo));
- if(!cLchUlDat)
+ RLC_SHRABL_STATIC_BUF_ALLOC(RLC_MEM_REGION_UL, RLC_POOL, dLchUlDat, \
+ sizeof(RguDDatIndInfo));
+ if(!dLchUlDat)
{
- DU_LOG("\nERROR --> RLC : Memory allocation failed at RlcProcUlData");
- ret = RFAILED;
- break;
- }
- memset(cLchUlDat, 0, sizeof(RguCDatIndInfo));
-
- cLchUlDat->cellId = ulData->cellId;
- GET_UE_ID(ulData->rnti, cLchUlDat->rnti);
- cLchUlDat->lcId = ulData->pduInfo[idx].lcId;
-
- /* Copy fixed buffer to message */
- if(ODU_GET_MSG_BUF(RLC_MEM_REGION_UL, RLC_POOL, &cLchUlDat->pdu) != ROK)
- {
- DU_LOG("\nERROR --> RLC : Memory allocation failed at RlcProcUlData");
- RLC_SHRABL_STATIC_BUF_FREE(RLC_MEM_REGION_UL, RLC_POOL, cLchUlDat, \
- sizeof(RguCDatIndInfo));
+ DU_LOG("\nERROR --> RLC : Memory allocation failed at RlcMacProcUlData");
ret = RFAILED;
break;
}
- oduCpyFixBufToMsg(ulData->pduInfo[idx].pduBuf, cLchUlDat->pdu, \
- ulData->pduInfo[idx].pduLen);
-
- rlcProcCommLcUlData(pst, 0, cLchUlDat);
+ dLchPduPres = TRUE;
}
- else
+
+ /* Copy fixed buffer to message */
+ lcId = ulData->pduInfo[idx].lcId;
+ if(ODU_GET_MSG_BUF(RLC_MEM_REGION_UL, RLC_POOL, \
+ &dLchData[lcId].pdu.mBuf[dLchData[lcId].pdu.numPdu]) != ROK)
{
- if(!dLchPduPres)
+ DU_LOG("\nERROR --> RLC : Memory allocation failed at RlcMacProcUlData");
+ for(pduIdx=0; pduIdx < dLchData[lcId].pdu.numPdu; pduIdx++)
{
- RLC_SHRABL_STATIC_BUF_ALLOC(RLC_MEM_REGION_UL, RLC_POOL, dLchUlDat, \
- sizeof(RguDDatIndInfo));
- if(!dLchUlDat)
- {
- DU_LOG("\nERROR --> RLC : Memory allocation failed at RlcMacProcUlData");
- ret = RFAILED;
- break;
- }
- dLchPduPres = TRUE;
+ ODU_PUT_MSG_BUF(dLchData[lcId].pdu.mBuf[dLchData[lcId].pdu.numPdu]);
}
-
- /* Copy fixed buffer to message */
- lcId = ulData->pduInfo[idx].lcId;
- if(ODU_GET_MSG_BUF(RLC_MEM_REGION_UL, RLC_POOL, \
- &dLchData[lcId].pdu.mBuf[dLchData[lcId].pdu.numPdu]) != ROK)
- {
- DU_LOG("\nERROR --> RLC : Memory allocation failed at RlcMacProcUlData");
- for(pduIdx=0; pduIdx < dLchData[lcId].pdu.numPdu; pduIdx++)
- {
- ODU_PUT_MSG_BUF(dLchData[lcId].pdu.mBuf[dLchData[lcId].pdu.numPdu]);
- }
- RLC_SHRABL_STATIC_BUF_FREE(RLC_MEM_REGION_UL, RLC_POOL, dLchUlDat, \
- sizeof(RguDDatIndInfo));
- ret = RFAILED;
- break;
- }
- oduCpyFixBufToMsg(ulData->pduInfo[idx].pduBuf, \
- dLchData[lcId].pdu.mBuf[dLchData[lcId].pdu.numPdu],\
- ulData->pduInfo[idx].pduLen);
-
- dLchData[lcId].pdu.numPdu++;
+ RLC_SHRABL_STATIC_BUF_FREE(RLC_MEM_REGION_UL, RLC_POOL, dLchUlDat, \
+ sizeof(RguDDatIndInfo));
+ ret = RFAILED;
+ break;
}
+ oduCpyFixBufToMsg(ulData->pduInfo[idx].pduBuf, \
+ dLchData[lcId].pdu.mBuf[dLchData[lcId].pdu.numPdu],\
+ ulData->pduInfo[idx].pduLen);
+
+ dLchData[lcId].pdu.numPdu++;
}
/* If any PDU received on dedicated logical channel, copy into RguDDatIndInfo
RLC_FREE_SHRABL_BUF(pst->region, pst->pool, ulData->pduInfo[pduIdx].pduBuf, \
ulData->pduInfo[pduIdx].pduLen);
}
- RLC_FREE_SHRABL_BUF(pst->region, pst->pool, ulData, sizeof(RlcData));
+ RLC_FREE_SHRABL_BUF(pst->region, pst->pool, ulData, sizeof(RlcUlData));
return ROK;
}/* End of RlcProcUlData */
DU_LOG("\nDEBUG --> RLC : Received scheduling report from MAC");
for(idx=0; idx < schRep->numLc; idx++)
{
- /* If it is common channel, fill status indication information
- * and trigger the handler for each common lch separately */
- if(schRep->lcSch[idx].commCh)
+ /* Fill status info structure if at least one channel's scheduling report is received */
+ if(nmbDLch == 0)
{
- RLC_SHRABL_STATIC_BUF_ALLOC(RLC_MEM_REGION_DL, RLC_POOL, cLchSchInfo, \
- sizeof(RguCStaIndInfo));
- if(!cLchSchInfo)
- {
- DU_LOG("\nERROR --> RLC: RlcProcSchedResultRpt: Memory allocation failed for cLchSchInfo");
- ret = RFAILED;
- break;
- }
- memset(cLchSchInfo, 0, sizeof(RguCStaIndInfo));
-
- cLchSchInfo->cellId = schRep->cellId;
- cLchSchInfo->lcId = schRep->lcSch[idx].lcId;
- cLchSchInfo->transId = schRep->slotInfo.sfn;
- cLchSchInfo->transId = (cLchSchInfo->transId << 16) | schRep->slotInfo.slot;
- cLchSchInfo->rnti = schRep->rnti;
- rlcProcCommLcSchedRpt(pst, 0, cLchSchInfo);
+ RLC_SHRABL_STATIC_BUF_ALLOC(RLC_MEM_REGION_DL, RLC_POOL, dLchSchInfo, \
+ sizeof(RguDStaIndInfo));
+ if(!dLchSchInfo)
+ {
+ DU_LOG("\nERROR --> RLC: RlcProcSchedResultRpt: Memory allocation failed for dLchSchInfo");
+ ret = RFAILED;
+ break;
+ }
+ dLchSchInfo->cellId = schRep->cellId;
+ dLchSchInfo->nmbOfUeGrantPerTti = 1;
+ /* MAC sends Scheduling report for one UE at a time. Hence filling
+ only the 0th index of staInd */
+ dLchSchInfo->staInd[0].rnti = schRep->rnti;
+
+ /* Storing sfn/slot into a single 32-bit variable to be used later*/
+ dLchSchInfo->staInd[0].transId = schRep->slotInfo.sfn;
+ dLchSchInfo->staInd[0].transId = \
+ (dLchSchInfo->staInd[0].transId << 16) | schRep->slotInfo.slot;
+ dLchSchInfo->staInd[0].nmbOfTbs = 1;
+ dLchSchInfo->staInd[0].fillCtrlPdu = true;
}
- else
- {
- /* Fill status info structure if at least one dedicated channel
- * scheduling report is received */
- if(nmbDLch == 0)
- {
- RLC_SHRABL_STATIC_BUF_ALLOC(RLC_MEM_REGION_DL, RLC_POOL, dLchSchInfo, \
- sizeof(RguDStaIndInfo));
- if(!dLchSchInfo)
- {
- DU_LOG("\nERROR --> RLC: RlcProcSchedResultRpt: Memory allocation failed for dLchSchInfo");
- ret = RFAILED;
- break;
- }
-
- dLchSchInfo->cellId = schRep->cellId;
- dLchSchInfo->nmbOfUeGrantPerTti = 1;
- /* MAC sends Scheduling report for one UE at a time. Hence filling
- only the 0th index of staInd */
- dLchSchInfo->staInd[0].rnti = schRep->rnti;
-
- /* Storing sfn/slot into a single 32-bit variable to be used later*/
- dLchSchInfo->staInd[0].transId = schRep->slotInfo.sfn;
- dLchSchInfo->staInd[0].transId = \
- (dLchSchInfo->staInd[0].transId << 16) | schRep->slotInfo.slot;
- dLchSchInfo->staInd[0].nmbOfTbs = 1;
- dLchSchInfo->staInd[0].fillCtrlPdu = true;
- }
-
- /* Fill logical channel scheduling info */
- dLchSchInfo->staInd[0].staIndTb[0].lchStaInd[nmbDLch].lcId = \
- schRep->lcSch[idx].lcId;
- dLchSchInfo->staInd[0].staIndTb[0].lchStaInd[nmbDLch].totBufSize = \
- schRep->lcSch[idx].bufSize;
- nmbDLch++;
- }
+
+ /* Fill logical channel scheduling info */
+ dLchSchInfo->staInd[0].staIndTb[0].lchStaInd[nmbDLch].lcId = \
+ schRep->lcSch[idx].lcId;
+ dLchSchInfo->staInd[0].staIndTb[0].lchStaInd[nmbDLch].totBufSize = \
+ schRep->lcSch[idx].bufSize;
+ nmbDLch++;
}
/* Calling handler for all dedicated channels scheduling*/
Pst pst;
CmLList *node; /* Current Link List Node */
RlcSdu *sdu; /* SDU */
- RlcData *dlData;
+ RlcDlData *dlData;
uint16_t pduLen;
uint16_t copyLen;
int16_t timeDiff = 0;
sdu = (RlcSdu *)node->node;
RLC_ALLOC_SHRABL_BUF(RLC_MEM_REGION_DL, RLC_POOL,
- dlData,(Size)sizeof(RlcData));
+ dlData,(Size)sizeof(RlcDlData));
#if (ERRCLASS & ERRCLS_ADD_RES)
if ( dlData == NULLP )
{
dlData->cellId = rbCb->rlcId.cellId;
dlData->rnti = sdu->mode.tm.rnti;
dlData->numPdu = 1;
- dlData->pduInfo[0].commCh = TRUE;
dlData->pduInfo[0].lcId = rbCb->lch.lChId;
/* Copy Message to fixed buffer to send */
{
RLC_FREE_SHRABL_BUF(pst.region, pst.pool, dlData->pduInfo[0].pduBuf, \
dlData->pduInfo[0].pduLen);
- RLC_FREE_SHRABL_BUF(pst.region, pst.pool, dlData, sizeof(RlcData));
+ RLC_FREE_SHRABL_BUF(pst.region, pst.pool, dlData, sizeof(RlcDlData));
}
return;
boStatus->cellId = rbCb->rlcId.cellId;
boStatus->ueId = rbCb->rlcId.ueId;
- boStatus->commCh = TRUE;
boStatus->lcId = rbCb->lch.lChId;
boStatus->bo = bo;
RguDDatReqPerUe datPerUe; /* DL data info per UE */
RguDatReqTb datPerTb; /* DL data info per TB */
RguLchDatReq datPerLch; /* DL data info per Lch */
- RlcData *dlData = NULLP; /* DL data to be sent to MAC */
+ RlcDlData *dlData = NULLP; /* DL data to be sent to MAC */
RlcDlRrcMsgRsp *dlRrcMsgRsp = NULLP; /*DL RRC Rsp to be sent to DU*/
Pst pst; /* Post structure */
uint16_t pduLen; /* PDU length */
uint8_t ret = ROK;
RLC_ALLOC_SHRABL_BUF(RLC_MEM_REGION_DL, RLC_POOL,
- dlData, sizeof(RlcData));
+ dlData, sizeof(RlcDlData));
if(dlData == NULLP)
{
DU_LOG("\nERROR --> RLC_DL : rlcSendDedLcDlData: Memory allocation failed for dl data");
datReqInfo, sizeof(RguDDatReqInfo));
return RFAILED;
}
- memset(dlData, 0, sizeof(RlcData));
+ memset(dlData, 0, sizeof(RlcDlData));
for(ueIdx = 0; ueIdx < datReqInfo->nmbOfUeGrantPerTti; ueIdx++)
{
lcId = datPerLch.lcId;
for(pduIdx = 0; pduIdx < datPerLch.pdu.numPdu; pduIdx++)
{
- dlData->pduInfo[dlData->numPdu].commCh = FALSE;
dlData->pduInfo[dlData->numPdu].lcId = datPerLch.lcId;
/* Copy Message to fixed buffer to send */
dlData->pduInfo[pduIdx].pduLen);
}
RLC_FREE_SHRABL_BUF(RLC_MEM_REGION_DL, RLC_POOL,
- dlData, sizeof(RlcData));
+ dlData, sizeof(RlcDlData));
RLC_FREE_SHRABL_BUF(post->region, post->pool,
datReqInfo, sizeof(RguDDatReqInfo));
return RFAILED;
}/* For per PDU */
dlData->boStatus[dlData->numLc].cellId = datReqInfo->cellId;
GET_UE_ID(datPerUe.rnti, dlData->boStatus[dlData->numLc].ueId);
- dlData->boStatus[dlData->numLc].commCh = false;
dlData->boStatus[dlData->numLc].lcId = datPerLch.lcId;
dlData->boStatus[dlData->numLc].bo = datPerLch.boReport.bo + datPerLch.boReport.estRlcHdrSz;
dlData->numLc++;
}
boStatus->cellId = dlData->cellId;
GET_UE_ID(dlData->rnti, boStatus->ueId);
- boStatus->commCh = FALSE;
boStatus->lcId = dlData->boStatus[lchIdx].lcId;
boStatus->bo = dlData->boStatus[lchIdx].bo;
DU_LOG("\nDEBUG --> RLC_DL : rlcSendDedLcDlData: BO Status sent successfully for LCID:%d,BO:%d",\
boStatus->lcId, boStatus->bo);
}
- RLC_FREE_SHRABL_BUF(RLC_MEM_REGION_DL, RLC_POOL, dlData, sizeof(RlcData));
+ RLC_FREE_SHRABL_BUF(RLC_MEM_REGION_DL, RLC_POOL, dlData, sizeof(RlcDlData));
RLC_FREE_SHRABL_BUF(post->region, post->pool, datReqInfo, sizeof(RguDDatReqInfo));
return (ret);
}
RLC_FREE_SHRABL_BUF(pst.region, pst.pool, dlData->pduInfo[pduIdx].pduBuf,\
dlData->pduInfo[pduIdx].pduLen);
}
- RLC_FREE_SHRABL_BUF(pst.region, pst.pool, dlData, sizeof(RlcData));
+ RLC_FREE_SHRABL_BUF(pst.region, pst.pool, dlData, sizeof(RlcDlData));
RLC_FREE_SHRABL_BUF(RLC_MEM_REGION_DL, RLC_POOL,
datReqInfo, sizeof(RguDDatReqInfo));
return RFAILED;
RLC_FREE_SHRABL_BUF(pst.region, pst.pool, dlData->pduInfo[pduIdx].pduBuf,\
dlData->pduInfo[pduIdx].pduLen);
}
- RLC_FREE_SHRABL_BUF(pst.region, pst.pool, dlData, sizeof(RlcData));
+ RLC_FREE_SHRABL_BUF(pst.region, pst.pool, dlData, sizeof(RlcDlData));
RLC_FREE_SHRABL_BUF(post->region, post->pool, datReqInfo, sizeof(RguDDatReqInfo));
RLC_FREE_SHRABL_BUF(pst.region, pst.pool, dlRrcMsgRsp, sizeof(RlcDlRrcMsgRsp));
return RFAILED;
boStatus->cellId = rbCb->rlcId.cellId;
boStatus->ueId = rbCb->rlcId.ueId;
- boStatus->commCh = FALSE;
boStatus->lcId = rbCb->lch.lChId;
boStatus->bo = bo + estHdrSz;
{
uint16_t cellId; /* Cell Id */
uint16_t ueId; /* UE Id */
- RlcRbType rbType; /* Radio Bearer Type */
- uint8_t rbId; /* Radio Bearer Id */
- uint8_t lcType; /* Logical channel type */
- uint8_t lcId; /* Logical channel Id */
+ uint8_t lcId; /* Logical channel Id {1...3} */
bool execDup; /* Execution duplication enabled */
bool deliveryStaRpt; /* Reporting of delivery status by RLC to DU-APP enabled */
uint16_t msgLen; /* RRC Message length */
{
uint16_t cellId; /* Cell Id */
uint16_t ueId; /* UE Id */
- uint8_t rbId; /* Radio Bearer Id */
+ uint8_t rbId; /* Radio Bearer Id {4 .. MAC\7fX_NUM_DRB} */
uint16_t msgLen; /* Message length */
Buffer *dlMsg; /* DL Data */
}RlcDlUserDataInfo;
* RFAILED - failure
*
* ****************************************************************/
-uint8_t packRlcDlData(Pst* pst, RlcData *dlData)
+uint8_t packRlcDlData(Pst* pst, RlcDlData *dlData)
{
Buffer *mBuf = NULLP;
* ****************************************************************/
uint8_t unpackRlcDlData(RlcMacDlDataFunc func, Pst *pst, Buffer *mBuf)
{
- RlcData *dlData;
+ RlcDlData *dlData;
if (pst->selector == ODU_SELECTOR_LWLC)
{
* RFAILED - failure
*
* ****************************************************************/
-uint8_t packRlcUlData(Pst* pst, RlcData *ulData)
+uint8_t packRlcUlData(Pst* pst, RlcUlData *ulData)
{
Buffer *mBuf = NULLP;
* ****************************************************************/
uint8_t unpackRlcUlData(RlcMacUlDataFunc func, Pst *pst, Buffer *mBuf)
{
- RlcData *ulData;
+ RlcUlData *ulData;
if (pst->selector == ODU_SELECTOR_LWLC)
{
{
uint16_t cellId; /*!< CELL ID */
uint16_t ueId; /*!< UE ID */
- bool commCh; /*!< Common or Dedicated Channel */
uint8_t lcId; /*!< Logical channel ID */
uint32_t bo; /*!< Buffer occupancy reported by RLC */
}RlcBoStatus;
/* Scheduled logical channel info */
typedef struct rlcLcSchInfo
{
- bool commCh; /* Common or dedicated channel */
uint8_t lcId; /*!< Logical channel ID */
uint32_t bufSize; /*!< Total buffer size in bytes scheduled by MAC */
}RlcLcSchInfo;
/* Schedule result report */
typedef struct rlcSchedResultRpt
{
- //Slot info
SlotTimingInfo slotInfo; /*!< Timing info */
uint16_t cellId; /*!< CELL ID */
uint16_t rnti; /*!< Temporary CRNTI */
/* DL/UL data transfer */
typedef struct rlcPduInfo
{
- bool commCh; /*!<Common or Dedicated Channel */
uint8_t lcId; /*!< Logical channel ID */
uint16_t pduLen; /*!< PDU Length */
uint8_t *pduBuf; /*!< RLC PDU buffer */
}RlcPduInfo;
-typedef struct rlcData
+typedef struct rlcDlData
{
- uint16_t cellId; /*!< CELL ID */
- uint16_t rnti; /*!< Temporary CRNTI */
- SlotTimingInfo slotInfo; /*!< Timing info */
- uint8_t numPdu; /*!< Number of RLC PDUs */
- RlcPduInfo pduInfo[MAX_NUM_PDU];
- uint8_t numLc;
- RlcBoStatus boStatus[MAX_NUM_LC]; /*!< Buffer occupancy */
-}RlcData;
+ SlotTimingInfo slotInfo; /*!< Timing info */
+ uint16_t cellId; /*!< CELL ID */
+ uint16_t rnti; /*!< Temporary CRNTI */
+ uint8_t numPdu; /*!< Number of RLC PDUs */
+ RlcPduInfo pduInfo[MAX_NUM_PDU];
+ uint8_t numLc;
+ RlcBoStatus boStatus[MAX_NUM_LC]; /*!< Buffer occupancy */
+}RlcDlData;
+
+typedef struct rlcUlData
+{
+ SlotTimingInfo slotInfo; /*!< Timing info */
+ uint16_t cellId; /*!< CELL ID */
+ uint16_t rnti; /*!< Temporary CRNTI */
+ uint8_t numPdu; /*!< Number of RLC PDUs */
+ RlcPduInfo pduInfo[MAX_NUM_PDU];
+}RlcUlData;
/* Function pointers */
typedef uint8_t (*RlcMacBoStatusFunc)(Pst* pst, RlcBoStatus *boStatus);
typedef uint8_t (*RlcMacSchedResultRptFunc)(Pst *pst, RlcSchedResultRpt *schRpt);
-typedef uint8_t (*RlcMacDlDataFunc)(Pst* pst, RlcData *dlData);
-typedef uint8_t (*RlcMacUlDataFunc)(Pst* pst, RlcData *ulData);
+typedef uint8_t (*RlcMacDlDataFunc)(Pst* pst, RlcDlData *dlData);
+typedef uint8_t (*RlcMacUlDataFunc)(Pst* pst, RlcUlData *ulData);
/* Function declarations */
uint8_t packRlcBoStatus(Pst* pst, RlcBoStatus* boStatus);
uint8_t packRlcSchedResultRpt(Pst* pst, RlcSchedResultRpt *schRpt);
uint8_t unpackSchedResultRpt(RlcMacSchedResultRptFunc func, Pst *pst, Buffer *mBuf);
uint8_t RlcProcSchedResultRpt(Pst *pst, RlcSchedResultRpt *schRpt);
-uint8_t packRlcDlData(Pst* pst, RlcData *datReq);
+uint8_t packRlcDlData(Pst* pst, RlcDlData *datReq);
uint8_t unpackRlcDlData(RlcMacDlDataFunc func, Pst *pst, Buffer *mBuf);
-uint8_t MacProcRlcDlData(Pst* pst, RlcData *dlData);
-uint8_t packRlcUlData(Pst* pst, RlcData *ulData);
+uint8_t MacProcRlcDlData(Pst* pst, RlcDlData *dlData);
+uint8_t packRlcUlData(Pst* pst, RlcUlData *ulData);
uint8_t unpackRlcUlData(RlcMacUlDataFunc func, Pst *pst, Buffer *mBuf);
-uint8_t RlcProcUlData(Pst* pst, RlcData *ulData);
+uint8_t RlcProcUlData(Pst* pst, RlcUlData *ulData);
/**********************************************************************
End of file
uint8_t drbCnt =0;
struct DRBs_Modified_ItemIEs *drbItemIe;
- /*VS: Below for loop is for debug purpose, to remove in final patch*/
- for(arrIdx = 0; arrIdx < ueCfg->numDrb; arrIdx++)
- {
- if(ueCfg->upTnlInfo[arrIdx].configType == CONFIG_MOD)
- {
- drbCnt++;
- }
- }
-
drbCnt = ueCfg->numDrbModified;
drbModList->list.count = drbCnt;
return RFAILED;
}
+ /*As per Spec ORAN WG8 AAD, lcId for DL RRC range from 1...3*/
+ if((f1DlRrcMsg->srbId < SRB1_LCID) || (f1DlRrcMsg->srbId > SRB3_LCID))
+ {
+ DU_LOG("\nERROR --> DU APP : Received SRBID for this Dl RRC Msg is not valid");
+ return RFAILED;
+ }
+
DU_ALLOC_SHRABL_BUF(dlRrcMsgInfo, sizeof(RlcDlRrcMsgInfo));
+
if(!dlRrcMsgInfo)
{
DU_LOG("\nERROR --> DU APP : Memory allocation failed for dlRrcMsgInfo in \
- duBuildAndSendDlRrcMsgToRlc");
+ duBuildAndSendDlRrcMsgToRlc");
DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, f1DlRrcMsg->rrcMsgPdu, f1DlRrcMsg->rrcMsgSize);
return RFAILED;
}
-
+
/* Filling up the RRC msg info */
dlRrcMsgInfo->cellId = cellId;
dlRrcMsgInfo->ueId = ueCfg.ueId;
{
if(ueCfg.rlcLcCfg[lcIdx].lcId == f1DlRrcMsg->srbId)
{
- dlRrcMsgInfo->rbType = ueCfg.rlcLcCfg[lcIdx].rbType;
- dlRrcMsgInfo->rbId = ueCfg.rlcLcCfg[lcIdx].rbId;
- dlRrcMsgInfo->lcType = ueCfg.rlcLcCfg[lcIdx].lcType;
- dlRrcMsgInfo->lcId = ueCfg.rlcLcCfg[lcIdx].lcId;
- break;
+ dlRrcMsgInfo->lcId = f1DlRrcMsg->srbId;
+ break;
}
}
+ if(lcIdx == (MAX_NUM_LC + 1))
+ {
+ DU_LOG("\nERROR --> DU APP : (duBuildAndSendDlRrcMsgToRlc) SRB for this DL_RRC msg is not configured.");
+ DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, f1DlRrcMsg->rrcMsgPdu, f1DlRrcMsg->rrcMsgSize);
+ return RFAILED;
+ }
+
dlRrcMsgInfo->execDup = f1DlRrcMsg->execDup;
dlRrcMsgInfo->deliveryStaRpt = f1DlRrcMsg->deliveryStatRpt;
dlRrcMsgInfo->msgLen = f1DlRrcMsg->rrcMsgSize;
ueFound = true;
ret = duBuildAndSendDlRrcMsgToRlc(duCb.actvCellLst[cellIdx]->cellId, \
duCb.actvCellLst[cellIdx]->ueCb[ueIdx].rlcUeCfg, dlRrcMsg);
+ if(ret == RFAILED)
+ {
+ DU_LOG("\nERROR --> DU_APP: duBuildAndSendDlRrcMsgToRlc() Failed for UE ID:%d", dlRrcMsg->gnbDuUeF1apId);
+ return RFAILED;
+ }
break;
}
}