RLC DL UMD PDU changes [Issue-ID: ODUHIGH-271]
[o-du/l2.git] / src / 5gnrmac / mac_msg_hdl.c
index f18c9d4..7966445 100644 (file)
@@ -210,15 +210,17 @@ uint8_t fapiMacRxDataInd(Pst *pst, RxDataInd *rxDataInd)
  * ****************************************************************/
 uint8_t MacProcRlcDlData(Pst* pstInfo, RlcData *dlData)
 {
-   uint8_t   pduIdx =0;
-   uint8_t   *txPdu =NULLP;
-   uint16_t  tbSize =0;
-   MacDlData macDlData;
-   MacDlSlot *currDlSlot = NULLP;
+   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++)
    {