* @return ROK
*
******************************************************************/
-uint8_t fillPdcchPdu(fapi_dl_tti_req_pdu_t *dlTtiReqPdu, DlSchedInfo *dlInfo, \
+uint8_t fillPdcchPdu(fapi_dl_tti_req_pdu_t *dlTtiReqPdu, DlSchedInfo *dlInfo, int8_t dlMsgSchInfoIdx, \
RntiType rntiType, uint8_t coreSetType, uint8_t ueIdx)
{
if(dlTtiReqPdu != NULLP)
}
else if(rntiType == TC_RNTI_TYPE || rntiType == C_RNTI_TYPE)
{
- pdcchInfo = &dlInfo->dlMsgAlloc[ueIdx]->dlMsgPdcchCfg;
- bwp = &dlInfo->dlMsgAlloc[ueIdx]->bwp;
+ pdcchInfo = &dlInfo->dlMsgAlloc[ueIdx]->dlMsgSchedInfo[dlMsgSchInfoIdx].dlMsgPdcchCfg;
+ bwp = &dlInfo->dlMsgAlloc[ueIdx]->dlMsgSchedInfo[dlMsgSchInfoIdx].bwp;
fillDlMsgDlDciPdu(dlTtiReqPdu->pdu.pdcch_pdu.dlDci, pdcchInfo,\
- &dlInfo->dlMsgAlloc[ueIdx]->dlMsgInfo);
+ &dlInfo->dlMsgAlloc[ueIdx]->dlMsgSchedInfo[dlMsgSchInfoIdx].dlMsgInfo);
}
else
{
if(dlInfo->dlMsgAlloc[ueIdx] != NULLP)
{
+ for(idx=0; idx<dlInfo->dlMsgAlloc[ueIdx]->numSchedInfo; idx++)
+ {
/* PDCCH and PDSCH PDU is filled */
- if(dlInfo->dlMsgAlloc[ueIdx]->pduPres == BOTH)
+ if(dlInfo->dlMsgAlloc[ueIdx]->dlMsgSchedInfo[idx].pduPres == BOTH)
count += 2;
- else
+ else if(dlInfo->dlMsgAlloc[ueIdx]->dlMsgSchedInfo[idx].pduPres != NONE)
count += 1;
-
+ }
}
}
return count;
* ********************************************************************/
uint8_t calcTxDataReqPduCount(DlSchedInfo *dlInfo)
{
- uint8_t count = 0, ueIdx=0;
+ uint8_t idx = 0, count = 0, ueIdx=0;
if(dlInfo->isBroadcastPres && dlInfo->brdcstAlloc.sib1Trans)
{
if(dlInfo->dlMsgAlloc[ueIdx] != NULLP)
{
- if(dlInfo->dlMsgAlloc[ueIdx]->pduPres == BOTH || dlInfo->dlMsgAlloc[ueIdx]->pduPres == PDSCH_PDU)
- count++;
+ for(idx=0; idx<dlInfo->dlMsgAlloc[ueIdx]->numSchedInfo; idx++)
+ {
+ if(dlInfo->dlMsgAlloc[ueIdx]->dlMsgSchedInfo[idx].pduPres == BOTH || \
+ dlInfo->dlMsgAlloc[ueIdx]->dlMsgSchedInfo[idx].pduPres == PDSCH_PDU)
+ count++;
+ }
}
}
return count;
if(numPduEncoded != nPdu)
{
rntiType = SI_RNTI_TYPE;
- fillPdcchPdu(&dlTtiReq->pdus[numPduEncoded],&currDlSlot->dlInfo,\
+ fillPdcchPdu(&dlTtiReq->pdus[numPduEncoded], &currDlSlot->dlInfo, -1, \
rntiType, CORESET_TYPE0, MAX_NUM_UE);
numPduEncoded++;
fillPdschPdu(&dlTtiReq->pdus[numPduEncoded],
(currDlSlot->dlInfo.rarAlloc[ueIdx]->pduPres == PDCCH_PDU))
{
fillPdcchPdu(&dlTtiReq->pdus[numPduEncoded], \
- &currDlSlot->dlInfo, rntiType, CORESET_TYPE0, ueIdx);
+ &currDlSlot->dlInfo, -1, rntiType, CORESET_TYPE0, ueIdx);
numPduEncoded++;
}
if((currDlSlot->dlInfo.rarAlloc[ueIdx]->pduPres == BOTH) || \
if(currDlSlot->dlInfo.dlMsgAlloc[ueIdx] != NULLP)
{
- if(currDlSlot->dlInfo.dlMsgAlloc[ueIdx]->dlMsgInfo.dlMsgPdu != NULLP)
+ for(idx=0; idx<currDlSlot->dlInfo.dlMsgAlloc[ueIdx]->numSchedInfo; idx++)
{
/* Filling Msg4 param */
- if((currDlSlot->dlInfo.dlMsgAlloc[ueIdx]->pduPres == BOTH) || \
- (currDlSlot->dlInfo.dlMsgAlloc[ueIdx]->pduPres == PDCCH_PDU))
+ if((currDlSlot->dlInfo.dlMsgAlloc[ueIdx]->dlMsgSchedInfo[idx].pduPres == BOTH) || \
+ (currDlSlot->dlInfo.dlMsgAlloc[ueIdx]->dlMsgSchedInfo[idx].pduPres == PDCCH_PDU))
{
- if(currDlSlot->dlInfo.dlMsgAlloc[ueIdx]->dlMsgInfo.isMsg4Pdu)
+ if(currDlSlot->dlInfo.dlMsgAlloc[ueIdx]->dlMsgSchedInfo[idx].dlMsgInfo.isMsg4Pdu)
{
rntiType = TC_RNTI_TYPE;
fillPdcchPdu(&dlTtiReq->pdus[numPduEncoded], \
- &currDlSlot->dlInfo, rntiType, CORESET_TYPE0, ueIdx);
+ &currDlSlot->dlInfo, idx, rntiType, CORESET_TYPE0, ueIdx);
}
else
{
/* Filling other DL msg params */
rntiType = C_RNTI_TYPE;
fillPdcchPdu(&dlTtiReq->pdus[numPduEncoded], \
- &currDlSlot->dlInfo, rntiType, CORESET_TYPE1, ueIdx);
+ &currDlSlot->dlInfo, idx, rntiType, CORESET_TYPE1, ueIdx);
}
numPduEncoded++;
}
- if((currDlSlot->dlInfo.dlMsgAlloc[ueIdx]->pduPres == BOTH) || \
- (currDlSlot->dlInfo.dlMsgAlloc[ueIdx]->pduPres == PDSCH_PDU))
+ if(currDlSlot->dlInfo.dlMsgAlloc[ueIdx]->dlMsgSchedInfo[idx].dlMsgInfo.dlMsgPdu != NULLP)
{
- fillPdschPdu(&dlTtiReq->pdus[numPduEncoded], &currDlSlot->dlInfo.dlMsgAlloc[ueIdx]->dlMsgPdschCfg,
- currDlSlot->dlInfo.dlMsgAlloc[ueIdx]->bwp, pduIndex);
- numPduEncoded++;
- pduIndex++;
-
- DU_LOG("\033[1;32m");
- if(currDlSlot->dlInfo.dlMsgAlloc[ueIdx]->dlMsgInfo.isMsg4Pdu)
- {
- DU_LOG("\nDEBUG --> LWR_MAC: MSG4 sent...");
- }
- else
+ if((currDlSlot->dlInfo.dlMsgAlloc[ueIdx]->dlMsgSchedInfo[idx].pduPres == BOTH) || \
+ (currDlSlot->dlInfo.dlMsgAlloc[ueIdx]->dlMsgSchedInfo[idx].pduPres == PDSCH_PDU))
{
- DU_LOG("\nDEBUG --> LWR_MAC: DL MSG sent...");
+ fillPdschPdu(&dlTtiReq->pdus[numPduEncoded], \
+ &currDlSlot->dlInfo.dlMsgAlloc[ueIdx]->dlMsgSchedInfo[idx].dlMsgPdschCfg,\
+ currDlSlot->dlInfo.dlMsgAlloc[ueIdx]->dlMsgSchedInfo[idx].bwp, pduIndex);
+ numPduEncoded++;
+ pduIndex++;
+
+ DU_LOG("\033[1;32m");
+ if(currDlSlot->dlInfo.dlMsgAlloc[ueIdx]->dlMsgSchedInfo[idx].dlMsgInfo.isMsg4Pdu)
+ {
+ DU_LOG("\nDEBUG --> LWR_MAC: MSG4 sent...");
+ }
+ else
+ {
+ DU_LOG("\nDEBUG --> LWR_MAC: DL MSG sent...");
+ }
+ DU_LOG("\033[0m");
}
- DU_LOG("\033[0m");
- }
- }
- else
- {
- MAC_FREE(currDlSlot->dlInfo.dlMsgAlloc[ueIdx], sizeof(DlMsgAlloc));
- currDlSlot->dlInfo.dlMsgAlloc[ueIdx] = NULLP;
+ }
+ /* else
+ {
+ MAC_FREE(currDlSlot->dlInfo.dlMsgAlloc[ueIdx], sizeof(DlMsgAlloc));
+ currDlSlot->dlInfo.dlMsgAlloc[ueIdx] = NULLP;
+ }
+ */
}
}
}
uint8_t nPdu = 0;
uint8_t ueIdx=0;
+ uint8_t schInfoIdx = 0;
uint16_t cellIdx=0;
uint16_t pduIndex = 0;
fapi_tx_data_req_t *txDataReq =NULLP;
if(dlInfo->dlMsgAlloc[ueIdx] != NULLP)
{
- fillDlMsgTxDataReq(txDataReq->pdu_desc, pduIndex, &dlInfo->dlMsgAlloc[ueIdx]->dlMsgInfo, \
- dlInfo->dlMsgAlloc[ueIdx]->dlMsgPdschCfg);
- pduIndex++;
- txDataReq->num_pdus++;
- MAC_FREE(dlInfo->dlMsgAlloc[ueIdx]->dlMsgInfo.dlMsgPdu, dlInfo->dlMsgAlloc[ueIdx]->dlMsgInfo.dlMsgPduLen);
- dlInfo->dlMsgAlloc[ueIdx]->dlMsgInfo.dlMsgPdu = NULLP;
+ for(schInfoIdx=0; schInfoIdx < dlInfo->dlMsgAlloc[ueIdx]->numSchedInfo; schInfoIdx++)
+ {
+ if((dlInfo->dlMsgAlloc[ueIdx]->dlMsgSchedInfo[schInfoIdx].pduPres == BOTH) || \
+ (dlInfo->dlMsgAlloc[ueIdx]->dlMsgSchedInfo[schInfoIdx].pduPres == PDSCH_PDU))
+ {
+ fillDlMsgTxDataReq(txDataReq->pdu_desc, pduIndex, \
+ &dlInfo->dlMsgAlloc[ueIdx]->dlMsgSchedInfo[schInfoIdx].dlMsgInfo, \
+ dlInfo->dlMsgAlloc[ueIdx]->dlMsgSchedInfo[schInfoIdx].dlMsgPdschCfg);
+ pduIndex++;
+ txDataReq->num_pdus++;
+ }
+ MAC_FREE(dlInfo->dlMsgAlloc[ueIdx]->dlMsgSchedInfo[schInfoIdx].dlMsgInfo.dlMsgPdu, \
+ dlInfo->dlMsgAlloc[ueIdx]->dlMsgSchedInfo[schInfoIdx].dlMsgInfo.dlMsgPduLen);
+ dlInfo->dlMsgAlloc[ueIdx]->dlMsgSchedInfo[schInfoIdx].dlMsgInfo.dlMsgPdu = NULLP;
+ }
MAC_FREE(dlInfo->dlMsgAlloc[ueIdx], sizeof(DlMsgAlloc));
}
}