X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2F5gnrmac%2Fmac_msg_hdl.c;h=bb8773092f0581bc8cb4b7124a84717d9b430561;hb=a5c3f55c615bff6a466e8273084757e8d339689e;hp=f18c9d4c78409608a1c4599ffc146a4d66fd3b24;hpb=d0d5d7b78e2a24af16003322cfd1c78bcd8d7664;p=o-du%2Fl2.git diff --git a/src/5gnrmac/mac_msg_hdl.c b/src/5gnrmac/mac_msg_hdl.c index f18c9d4c7..bb8773092 100644 --- a/src/5gnrmac/mac_msg_hdl.c +++ b/src/5gnrmac/mac_msg_hdl.c @@ -211,14 +211,16 @@ uint8_t fapiMacRxDataInd(Pst *pst, RxDataInd *rxDataInd) uint8_t MacProcRlcDlData(Pst* pstInfo, RlcData *dlData) { uint8_t pduIdx =0; + uint8_t lcIdx = 0; uint8_t *txPdu =NULLP; uint16_t tbSize =0; MacDlData macDlData; MacDlSlot *currDlSlot = NULLP; + DlRlcBoInfo dlBoInfo; memset(&macDlData , 0, sizeof(MacDlData)); - DU_LOG("\nDEBUG --> MAC: Received DL data for sfn=%d slot=%d", \ - dlData->slotInfo.sfn, dlData->slotInfo.slot); + DU_LOG("\nDEBUG --> MAC: Received DL data for sfn=%d slot=%d numPdu= %d", \ + dlData->slotInfo.sfn, dlData->slotInfo.slot, dlData->numPdu); /* Copy the pdus to be muxed into mac Dl data */ macDlData.numPdu = dlData->numPdu; for(pduIdx = 0; pduIdx < dlData->numPdu; pduIdx++) @@ -248,6 +250,19 @@ uint8_t MacProcRlcDlData(Pst* pstInfo, RlcData *dlData) } } + for(lcIdx = 0; lcIdx < dlData->numLc; lcIdx++) + { + if(dlData->boStatus[lcIdx].bo) + { + memset(&dlBoInfo, 0, sizeof(DlRlcBoInfo)); + dlBoInfo.cellId = dlData->boStatus[lcIdx].cellId; + GET_CRNTI(dlBoInfo.crnti, dlData->boStatus[lcIdx].ueIdx); + dlBoInfo.lcId = dlData->boStatus[lcIdx].lcId; + dlBoInfo.dataVolume = dlData->boStatus[lcIdx].bo; + sendDlRlcBoInfoToSch(&dlBoInfo); + } + } + /* Free memory */ for(pduIdx = 0; pduIdx < dlData->numPdu; pduIdx++) { @@ -256,9 +271,8 @@ uint8_t MacProcRlcDlData(Pst* pstInfo, RlcData *dlData) } 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(RlcData)); } - return ROK; }