+
+ /* check for RAR */
+ if(cell->dlAlloc[slot]->rarPres == true)
+ {
+ dlAlloc.isRarPres = true;
+ /* RAR info is copied, this was earlier filled in schProcessRachInd */
+ memcpy(&rarAlloc->rarInfo, &cell->dlAlloc[slot]->rarInfo, sizeof(RarInfo));
+
+ /* pdcch and pdsch data is filled */
+ schFillRar(rarAlloc,
+ cell->dlAlloc[slot]->rarInfo.raRnti,
+ cell->cellCfg.phyCellId,
+ cell->cellCfg.ssbSchCfg.ssbOffsetPointA);
+
+ cell->dlAlloc[slot]->rarPres = false;
+ }
+
+ /* check for MSG4 */
+ if(cell->dlAlloc[slot]->msg4Info)
+ {
+ SCH_ALLOC(msg4Alloc, sizeof(Msg4Alloc));
+ if(!msg4Alloc)
+ {
+ DU_LOG("\nMAC: Memory Allocation failed for msg4 alloc");
+ return RFAILED;
+ }
+
+ dlAlloc.msg4Alloc = msg4Alloc;
+
+ /* Msg4 info is copied, this was earlier filled in macSchDlRlcBoInfo */
+ memcpy(&msg4Alloc->msg4Info, cell->dlAlloc[slot]->msg4Info, \
+ sizeof(Msg4Info));
+
+ /* pdcch and pdsch data is filled */
+ schDlRsrcAllocMsg4(msg4Alloc, cell, slot);
+ SCH_FREE(cell->dlAlloc[slot]->msg4Info, sizeof(Msg4Info));
+ cell->dlAlloc[slot]->msg4Info = NULL;
+ }
+
+
+ /* send msg to MAC */
+ ret = sendDlAllocToMac(&dlAlloc, schInst);