pduIndex++;
DU_LOG("\033[1;32m");
- if((macCb.macCell[cellIdx]->macRaCb[ueIdx].macMsg4Status))
+ if((macCb.macCell[cellIdx]->macRaCb[ueIdx].macMsg4Status) && \
+ (*macCb.macCell[cellIdx]->macRaCb[ueIdx].macMsg4Status == TRUE))
{
DU_LOG("\nDEBUG --> LWR_MAC: MSG4 sent...");
MAC_FREE(macCb.macCell[cellIdx]->macRaCb[ueIdx].macMsg4Status, sizeof(bool));
typedef struct macCbInfo
{
- uint16_t cellId;
- uint16_t crnti;
- uint8_t msg3Pdu[6]; /* used as CRI value during muxing */
- uint8_t *msg4Pdu; /* storing DL-CCCH Ind Pdu */
- uint16_t msg4PduLen; /* storing DL-CCCH Ind Pdu Len */
- DlHarqProcCb msg4HqInfo; /* HARQ process info for msg 4 */
- bool *macMsg4Status;
+ uint16_t cellId;
+ uint16_t crnti;
+ uint8_t msg3Pdu[6]; /* used as CRI value during muxing */
+ uint8_t *msg4Pdu; /* storing DL-CCCH Ind Pdu */
+ uint16_t msg4PduLen; /* storing DL-CCCH Ind Pdu Len */
+ DlHarqProcCb msg4HqInfo; /* HARQ process info for msg 4 */
+ bool *macMsg4Status;
+ SlotTimingInfo msg4PdschSlotInfo; /*MSG4 PDSCH slot timing info*/
}MacRaCbInfo;
typedef struct macCe
if(dlSchedInfo->dlMsgAlloc[ueIdx]->dlMsgPdcchCfg && dlSchedInfo->dlMsgAlloc[ueIdx]->dlMsgPdcchCfg->coresetCfg.coreSetType == CORESET_TYPE0)
{
MAC_ALLOC(macCb.macCell[cellIdx]->macRaCb[ueIdx].macMsg4Status, sizeof(bool));
+ *macCb.macCell[cellIdx]->macRaCb[ueIdx].macMsg4Status = FALSE;
+ memcpy(&macCb.macCell[cellIdx]->macRaCb[ueIdx].msg4PdschSlotInfo, &dlSchedInfo->schSlotValue.msg4PdschTime, sizeof(SlotTimingInfo));
}
/* Check if the downlink pdu is msg4 */
- if((macCb.macCell[cellIdx]->macRaCb[ueIdx].macMsg4Status))
+ if((macCb.macCell[cellIdx]->macRaCb[ueIdx].macMsg4Status) &&
+ (macCb.macCell[cellIdx]->macRaCb[ueIdx].msg4PdschSlotInfo.sfn == dlSchedInfo->schSlotValue.dlMsgTime.sfn &&
+ macCb.macCell[cellIdx]->macRaCb[ueIdx].msg4PdschSlotInfo.slot == dlSchedInfo->schSlotValue.dlMsgTime.slot))
{
GET_UE_ID(dlSchedInfo->dlMsgAlloc[ueIdx]->crnti, ueId);
ueIdx = ueId -1;
schedInfo = dlSchedInfo->dlMsgAlloc[ueIdx];
hqProcCb = &macCb.macCell[cellIdx]->macRaCb[ueIdx].msg4HqInfo;
+ *macCb.macCell[cellIdx]->macRaCb[ueIdx].macMsg4Status = TRUE;
if(!dlSchedInfo->dlMsgAlloc[ueIdx]->transportBlock[0].ndi)
{
{
if(currDlSlot->dlInfo.dlMsgAlloc[ueIdx])
{
- if((macCb.macCell[cellIdx]->macRaCb[ueIdx].macMsg4Status)&& (currDlSlot->dlInfo.dlMsgAlloc[ueIdx]->dlMsgPdschCfg))
+ if((macCb.macCell[cellIdx]->macRaCb[ueIdx].macMsg4Status)&&
+ (*macCb.macCell[cellIdx]->macRaCb[ueIdx].macMsg4Status == TRUE) &&
+ (currDlSlot->dlInfo.dlMsgAlloc[ueIdx]->dlMsgPdschCfg))
{
fillMsg4Pdu(currTimingInfo.cellId, currDlSlot->dlInfo.dlMsgAlloc[ueIdx]);
}
}
SCH_FREE(cellCb->schDlSlotInfo[slotIdx]->ulGrant, sizeof(DciInfo));
SCH_FREE(cellCb->schDlSlotInfo[slotIdx], sizeof(SchDlSlotInfo));
+ SCH_FREE(msg4PdschTime, sizeof(SlotTimingInfo));
}
SCH_FREE(cellCb->schDlSlotInfo, cellCb->numSlots *sizeof(SchDlSlotInfo*));
}
*/
typedef struct schDlSlotInfo
{
- SchPrbAlloc prbAlloc; /*!< PRB allocated/available in this slot */
- bool ssbPres; /*!< Flag to determine if SSB is present in this slot */
- uint8_t ssbIdxSupported; /*!< Max SSB index */
- SsbInfo ssbInfo[MAX_SSB_IDX]; /*!< SSB info */
- bool sib1Pres; /*!< Flag to determine if SIB1 is present in this slot */
- uint8_t pdcchUe; /*!< UE for which PDCCH Common is scheduled in this slot */
- RarAlloc *rarAlloc[MAX_NUM_UE]; /*!< RAR allocation per UE*/
- DciInfo *ulGrant;
- DlMsgSchInfo *dlMsgAlloc[MAX_NUM_UE]; /*!< Dl msg allocation per UE*/
+ SchPrbAlloc prbAlloc; /*!< PRB allocated/available in this slot */
+ bool ssbPres; /*!< Flag to determine if SSB is present in this slot */
+ uint8_t ssbIdxSupported; /*!< Max SSB index */
+ SsbInfo ssbInfo[MAX_SSB_IDX]; /*!< SSB info */
+ bool sib1Pres; /*!< Flag to determine if SIB1 is present in this slot */
+ uint8_t pdcchUe; /*!< UE for which PDCCH Common is scheduled in this slot */
+ SlotTimingInfo *msg4PdschTime; /*!< PDSCH time for MSG4*/
+ RarAlloc *rarAlloc[MAX_NUM_UE]; /*!< RAR allocation per UE*/
+ DciInfo *ulGrant;
+ DlMsgSchInfo *dlMsgAlloc[MAX_NUM_UE]; /*!< Dl msg allocation per UE*/
}SchDlSlotInfo;
typedef struct schRaCb
/* Check if both DCI and RAR are sent in the same slot.
* If not, allocate memory RAR PDSCH slot to store RAR info
*/
+ SCH_ALLOC(cell->schDlSlotInfo[pdcchTime.slot]->msg4PdschTime, sizeof(SlotTimingInfo));
+ memcpy(cell->schDlSlotInfo[pdcchTime.slot]->msg4PdschTime, &pdschTime, sizeof(SlotTimingInfo));
+
if(pdcchTime.slot == pdschTime.slot)
{
SCH_ALLOC(dciSlotAlloc->dlMsgPdschCfg, sizeof(PdschCfg));
* specific interface structure to send to MAC */
if(cell->schDlSlotInfo[dlSchedInfo.schSlotValue.dlMsgTime.slot]->dlMsgAlloc[ueIdx] != NULLP)
{
+ if(cell->schDlSlotInfo[dlSchedInfo.schSlotValue.dlMsgTime.slot]->msg4PdschTime != NULLP)
+ {
+ memcpy(&dlSchedInfo.schSlotValue.msg4PdschTime, \
+ cell->schDlSlotInfo[dlSchedInfo.schSlotValue.dlMsgTime.slot]->msg4PdschTime, sizeof(SlotTimingInfo));
+ SCH_FREE(cell->schDlSlotInfo[dlSchedInfo.schSlotValue.dlMsgTime.slot]->msg4PdschTime, sizeof(SlotTimingInfo));
+ }
slot = dlSchedInfo.schSlotValue.dlMsgTime.slot;
dlSchedInfo.dlMsgAlloc[ueIdx] = cell->schDlSlotInfo[slot]->dlMsgAlloc[ueIdx];
cell->schDlSlotInfo[slot]->dlMsgAlloc[ueIdx] = NULLP;
SlotTimingInfo broadcastTime;
SlotTimingInfo rarTime;
SlotTimingInfo dlMsgTime;
+ SlotTimingInfo msg4PdschTime;
SlotTimingInfo ulDciTime;
}SchSlotValue;