{
uint8_t pduIdx;
uint8_t preambleIdx;
- RachIndInfo rachIndInfo;
+ RachIndInfo *rachIndInfo;
- DU_LOG("\nMAC : Received RACH indication");
+ DU_LOG("\nINFO --> MAC : Received RACH indication");
/* Considering one pdu and one preamble */
pduIdx = 0;
preambleIdx = 0;
- rachIndInfo.cellId = rachInd->cellId;
- rachIndInfo.timingInfo.sfn = rachInd->timingInfo.sfn;
- rachIndInfo.timingInfo.slot = rachInd->timingInfo.slot;
- rachIndInfo.slotIdx = rachInd->rachPdu[pduIdx].slotIdx;
- rachIndInfo.symbolIdx = rachInd->rachPdu[pduIdx].symbolIdx;
- rachIndInfo.freqIdx = rachInd->rachPdu[pduIdx].freqIdx;
- rachIndInfo.preambleIdx = \
+ MAC_ALLOC(rachIndInfo, sizeof(RachIndInfo));
+ if(!rachIndInfo)
+ {
+ DU_LOG("\nERROR --> MAC : Memory allocation failure in fapiMacRachInd");
+ MAC_FREE_SHRABL_BUF(pst->region, pst->pool, rachInd, sizeof(RachInd));
+ return RFAILED;
+ }
+
+ rachIndInfo->cellId = rachInd->cellId;
+ rachIndInfo->timingInfo.sfn = rachInd->timingInfo.sfn;
+ rachIndInfo->timingInfo.slot = rachInd->timingInfo.slot;
+ rachIndInfo->slotIdx = rachInd->rachPdu[pduIdx].slotIdx;
+ rachIndInfo->symbolIdx = rachInd->rachPdu[pduIdx].symbolIdx;
+ rachIndInfo->freqIdx = rachInd->rachPdu[pduIdx].freqIdx;
+ rachIndInfo->preambleIdx = \
rachInd->rachPdu[pduIdx].preamInfo[preambleIdx].preamIdx;
- rachIndInfo.timingAdv = \
+ rachIndInfo->timingAdv = \
rachInd->rachPdu[pduIdx].preamInfo[preambleIdx].timingAdv;
- /* storing the value in macRaCb */
- createMacRaCb(&rachIndInfo);
+ /* Store the value in macRaCb */
+ createMacRaCb(rachIndInfo);
+ /* Free sharable buffer used to send RACH Indication from lower MAC to MAC */
MAC_FREE_SHRABL_BUF(pst->region, pst->pool, rachInd, sizeof(RachInd));
- return(sendRachIndMacToSch(&rachIndInfo));
+
+ /* Send RACH Indication to SCH */
+ return(sendRachIndMacToSch(rachIndInfo));
}
/* spec-38.211 Table 6.3.3.1-7 */
{
uint16_t cellIdx;
+#ifdef CALL_FLOW_DEBUG_LOG
+ DU_LOG("\nCall Flow: ENTSCH -> ENTMAC : EVENT_UL_SCH_INFO\n");
+#endif
+
GET_CELL_IDX(ulSchedInfo->cellId, cellIdx);
if(ulSchedInfo != NULLP)
{
MacUlSlot *currUlSlot =
- &macCb.macCell[cellIdx]->ulSlot[ulSchedInfo->slotIndInfo.slot % MAX_SLOT_SUPPORTED];
+ &macCb.macCell[cellIdx]->ulSlot[ulSchedInfo->slotIndInfo.slot % MAX_SLOTS];
memcpy(&currUlSlot->ulInfo, ulSchedInfo, sizeof(UlSchedInfo));
}
return ROK;