uint16_t sendTxDataReq(SlotTimingInfo currTimingInfo, MacDlSlot *dlSlot, p_fapi_api_queue_elem_t prevElem, fapi_vendor_tx_data_req_t *vendorTxDataReq);
uint16_t fillUlTtiReq(SlotTimingInfo currTimingInfo, p_fapi_api_queue_elem_t prevElem, fapi_vendor_ul_tti_req_t* vendorUlTti);
uint16_t fillUlDciReq(SlotTimingInfo currTimingInfo, p_fapi_api_queue_elem_t prevElem, fapi_vendor_ul_dci_req_t *vendorUlDciReq);
-uint8_t lwr_mac_procStopReqEvt(SlotTimingInfo slotInfo, p_fapi_api_queue_elem_t prevElem);
+uint8_t lwr_mac_procStopReqEvt(SlotTimingInfo slotInfo, p_fapi_api_queue_elem_t prevElem, fapi_stop_req_vendor_msg_t *vendorMsg);
void lwrMacLayerInit(Region region, Pool pool)
{
*
********************************************************************/
-uint8_t lwr_mac_procStopReqEvt(SlotTimingInfo slotInfo, p_fapi_api_queue_elem_t prevElem)
+uint8_t lwr_mac_procStopReqEvt(SlotTimingInfo slotInfo, p_fapi_api_queue_elem_t prevElem, fapi_stop_req_vendor_msg_t *vendorMsg)
{
#ifdef INTEL_FAPI
#ifdef CALL_FLOW_DEBUG_LOG
#endif
fapi_stop_req_t *stopReq;
- fapi_vendor_msg_t *vendorMsg;
p_fapi_api_queue_elem_t stopReqElem;
- p_fapi_api_queue_elem_t vendorMsgElem;
- /* Allocte And fill Vendor msg */
- LWR_MAC_ALLOC(vendorMsgElem, (sizeof(fapi_api_queue_elem_t) + sizeof(fapi_vendor_msg_t)));
- if(!vendorMsgElem)
- {
- DU_LOG("\nERROR --> LWR_MAC: Memory allocation failed for vendor msg in stop req");
- return RFAILED;
- }
- FILL_FAPI_LIST_ELEM(vendorMsgElem, NULLP, FAPI_VENDOR_MESSAGE, 1, sizeof(fapi_vendor_msg_t));
- vendorMsg = (fapi_vendor_msg_t *)(vendorMsgElem + 1);
- fillMsgHeader(&vendorMsg->header, FAPI_VENDOR_MESSAGE, sizeof(fapi_vendor_msg_t));
- vendorMsg->stop_req_vendor.sfn = slotInfo.sfn;
- vendorMsg->stop_req_vendor.slot = slotInfo.slot;
+ vendorMsg->sfn = slotInfo.sfn;
+ vendorMsg->slot = slotInfo.slot;
/* Fill FAPI stop req */
LWR_MAC_ALLOC(stopReqElem, (sizeof(fapi_api_queue_elem_t) + sizeof(fapi_stop_req_t)));
if(!stopReqElem)
{
DU_LOG("\nERROR --> LWR_MAC: Memory allocation failed for stop req");
- LWR_MAC_FREE(vendorMsgElem, (sizeof(fapi_api_queue_elem_t) + sizeof(fapi_vendor_msg_t)));
return RFAILED;
}
- FILL_FAPI_LIST_ELEM(stopReqElem, vendorMsgElem, FAPI_STOP_REQUEST, 1, \
- sizeof(fapi_stop_req_t));
+ FILL_FAPI_LIST_ELEM(stopReqElem, NULLP, FAPI_STOP_REQUEST, 1, sizeof(fapi_stop_req_t));
stopReq = (fapi_stop_req_t *)(stopReqElem + 1);
memset(stopReq, 0, sizeof(fapi_stop_req_t));
fillMsgHeader(&stopReq->header, FAPI_STOP_REQUEST, sizeof(fapi_stop_req_t));
{
GET_CELL_IDX(currTimingInfo.cellId, cellIdx);
/* consider phy delay */
- ADD_DELTA_TO_TIME(currTimingInfo,dlTtiReqTimingInfo,PHY_DELTA_DL);
+ ADD_DELTA_TO_TIME(currTimingInfo,dlTtiReqTimingInfo,PHY_DELTA_DL, macCb.macCell[cellIdx]->numOfSlots);
dlTtiReqTimingInfo.cellId = currTimingInfo.cellId;
macCellCfg = macCb.macCell[cellIdx]->macCellCfg;
if(macCb.macCell[cellIdx]->state == CELL_TO_BE_STOPPED)
{
/* Intel L1 expects UL_DCI.request following DL_TTI.request */
- lwr_mac_procStopReqEvt(currTimingInfo, prevElem);
+ lwr_mac_procStopReqEvt(currTimingInfo, prevElem, &(vendorMsg->stop_req_vendor));
msgHeader->num_msg++;
macCb.macCell[cellIdx]->state = CELL_STOP_IN_PROGRESS;
- prevElem = prevElem->p_next;
+ prevElem = prevElem->p_next;
}
prevElem->p_next = vendorMsgQElem;
LwrMacSendToL1(headerElem);
ulTtiReqPdu->pdu.pusch_pdu.numDmrsCdmGrpsNoData = 1;
ulTtiReqPdu->pdu.pusch_pdu.dmrsPorts = 0;
ulTtiReqPdu->pdu.pusch_pdu.resourceAlloc = \
- currUlSlot->ulInfo.schPuschInfo.resAllocType;
+ currUlSlot->ulInfo.schPuschInfo.fdAlloc.resAllocType;
ulTtiReqPdu->pdu.pusch_pdu.rbStart = \
- currUlSlot->ulInfo.schPuschInfo.fdAlloc.startPrb;
+ currUlSlot->ulInfo.schPuschInfo.fdAlloc.resAlloc.type1.startPrb;
ulTtiReqPdu->pdu.pusch_pdu.rbSize = \
- currUlSlot->ulInfo.schPuschInfo.fdAlloc.numPrb;
+ currUlSlot->ulInfo.schPuschInfo.fdAlloc.resAlloc.type1.numPrb;
ulTtiReqPdu->pdu.pusch_pdu.vrbToPrbMapping = 0;
ulTtiReqPdu->pdu.pusch_pdu.frequencyHopping = 0;
ulTtiReqPdu->pdu.pusch_pdu.txDirectCurrentLocation = 0;
currUlSlot->ulInfo.schPuschInfo.tdAlloc.startSymb;
ulTtiReqPdu->pdu.pusch_pdu.nrOfSymbols = \
currUlSlot->ulInfo.schPuschInfo.tdAlloc.numSymb;
+#ifdef INTEL_FAPI
ulTtiReqPdu->pdu.pusch_pdu.mappingType = \
currUlSlot->ulInfo.schPuschInfo.dmrsMappingType;
ulTtiReqPdu->pdu.pusch_pdu.nrOfDmrsSymbols = \
currUlSlot->ulInfo.schPuschInfo.nrOfDmrsSymbols;
ulTtiReqPdu->pdu.pusch_pdu.dmrsAddPos = \
currUlSlot->ulInfo.schPuschInfo.dmrsAddPos;
+#endif
ulTtiReqPdu->pdu.pusch_pdu.puschData.rvIndex = \
currUlSlot->ulInfo.schPuschInfo.tbInfo.rv;
ulTtiReqPdu->pdu.pusch_pdu.puschData.harqProcessId = \
{
ulTtiReqPdu->pduType = PUCCH_PDU_TYPE;
memset(&ulTtiReqPdu->pdu.pucch_pdu, 0, sizeof(fapi_ul_pucch_pdu_t));
- ulTtiReqPdu->pdu.pucch_pdu.rnti = currUlSlot->ulInfo.schPucchInfo.rnti;
+ ulTtiReqPdu->pdu.pucch_pdu.rnti = currUlSlot->ulInfo.crnti;
/* TODO : Fill handle in raCb when scheduling pucch and access here */
ulTtiReqPdu->pdu.pucch_pdu.handle = 100;
ulTtiReqPdu->pdu.pucch_pdu.bwpSize = macCellCfg->initialUlBwp.bwp.numPrb;
ulTtiReqPdu->pdu.pucch_pdu.formatType = currUlSlot->ulInfo.schPucchInfo.pucchFormat; /* Supporting PUCCH Format 0 */
ulTtiReqPdu->pdu.pucch_pdu.multiSlotTxIndicator = 0; /* No Multi Slot transmission */
- ulTtiReqPdu->pdu.pucch_pdu.prbStart = currUlSlot->ulInfo.schPucchInfo.fdAlloc.startPrb;
- ulTtiReqPdu->pdu.pucch_pdu.prbSize = currUlSlot->ulInfo.schPucchInfo.fdAlloc.numPrb;
+ ulTtiReqPdu->pdu.pucch_pdu.prbStart = currUlSlot->ulInfo.schPucchInfo.fdAlloc.resAlloc.type1.startPrb;
+ ulTtiReqPdu->pdu.pucch_pdu.prbSize = currUlSlot->ulInfo.schPucchInfo.fdAlloc.resAlloc.type1.numPrb;
ulTtiReqPdu->pdu.pucch_pdu.startSymbolIndex = currUlSlot->ulInfo.schPucchInfo.tdAlloc.startSymb;
ulTtiReqPdu->pdu.pucch_pdu.nrOfSymbols = currUlSlot->ulInfo.schPucchInfo.tdAlloc.numSymb;
ulTtiReqPdu->pdu.pucch_pdu.freqHopFlag = currUlSlot->ulInfo.schPucchInfo.intraFreqHop;
ulTtiReqPdu->pdu.pucch_pdu.timeDomainOccIdx = currUlSlot->ulInfo.schPucchInfo.timeDomOCC;
ulTtiReqPdu->pdu.pucch_pdu.preDftOccIdx = currUlSlot->ulInfo.schPucchInfo.occIdx; /* Valid for Format 4 only */
ulTtiReqPdu->pdu.pucch_pdu.preDftOccLen = currUlSlot->ulInfo.schPucchInfo.occLen; /* Valid for Format 4 only */
- ulTtiReqPdu->pdu.pucch_pdu.pi2Bpsk = currUlSlot->ulInfo.schPucchInfo.cmnFormatCfg.pi2BPSK;
- ulTtiReqPdu->pdu.pucch_pdu.addDmrsFlag = currUlSlot->ulInfo.schPucchInfo.cmnFormatCfg.addDmrs;/* Valid for Format 3, 4 only */
+ ulTtiReqPdu->pdu.pucch_pdu.pi2Bpsk = currUlSlot->ulInfo.schPucchInfo.pi2BPSK;
+ ulTtiReqPdu->pdu.pucch_pdu.addDmrsFlag = currUlSlot->ulInfo.schPucchInfo.addDmrs;/* Valid for Format 3, 4 only */
ulTtiReqPdu->pdu.pucch_pdu.dmrsScramblingId = 0; /* Valid for Format 2 */
ulTtiReqPdu->pdu.pucch_pdu.dmrsCyclicShift = 0; /* Valid for Format 4 */
ulTtiReqPdu->pdu.pucch_pdu.srFlag = currUlSlot->ulInfo.schPucchInfo.srFlag;
- ulTtiReqPdu->pdu.pucch_pdu.bitLenHarq = currUlSlot->ulInfo.schPucchInfo.numHarqBits;
+ ulTtiReqPdu->pdu.pucch_pdu.bitLenHarq = currUlSlot->ulInfo.schPucchInfo.harqInfo.harqBitLength;
ulTtiReqPdu->pdu.pucch_pdu.bitLenCsiPart1 = 0; /* Valid for Format 2, 3, 4 */
ulTtiReqPdu->pdu.pucch_pdu.bitLenCsiPart2 = 0; /* Valid for Format 2, 3, 4 */
- ulTtiReqPdu->pdu.pucch_pdu.beamforming.numPrgs = 0; /* Not Supported */
- ulTtiReqPdu->pdu.pucch_pdu.beamforming.prgSize = 0;
- ulTtiReqPdu->pdu.pucch_pdu.beamforming.digBfInterface = 0;
- ulTtiReqPdu->pdu.pucch_pdu.beamforming.rx_bfi[0].beamIdx[0].beamidx = 0;
+ ulTtiReqPdu->pdu.pucch_pdu.beamforming.numPrgs = currUlSlot->ulInfo.schPucchInfo.beamPucchInfo.numPrgs;
+ ulTtiReqPdu->pdu.pucch_pdu.beamforming.prgSize = currUlSlot->ulInfo.schPucchInfo.beamPucchInfo.prgSize;
+ ulTtiReqPdu->pdu.pucch_pdu.beamforming.digBfInterface = currUlSlot->ulInfo.schPucchInfo.beamPucchInfo.digBfInterfaces;
+ ulTtiReqPdu->pdu.pucch_pdu.beamforming.rx_bfi[0].beamIdx[0].beamidx = currUlSlot->ulInfo.schPucchInfo.beamPucchInfo.prg[0].beamIdx[0];
ulTtiReqPdu->pduSize = sizeof(fapi_ul_pucch_pdu_t);
macCellCfg = macCb.macCell[cellIdx]->macCellCfg;
/* add PHY delta */
- ADD_DELTA_TO_TIME(currTimingInfo,ulTtiReqTimingInfo,PHY_DELTA_UL);
- currUlSlot = &macCb.macCell[cellIdx]->ulSlot[ulTtiReqTimingInfo.slot % MAX_SLOTS];
+ ADD_DELTA_TO_TIME(currTimingInfo,ulTtiReqTimingInfo,PHY_DELTA_UL, macCb.macCell[cellIdx]->numOfSlots);
+ currUlSlot = &macCb.macCell[cellIdx]->ulSlot[ulTtiReqTimingInfo.slot % macCb.macCell[cellIdx]->numOfSlots];
LWR_MAC_ALLOC(ulTtiElem, (sizeof(fapi_api_queue_elem_t) + sizeof(fapi_ul_tti_req_t)));
if(ulTtiElem)
{
GET_CELL_IDX(currTimingInfo.cellId, cellIdx);
memcpy(&ulDciReqTimingInfo, &currTimingInfo, sizeof(SlotTimingInfo));
- currDlSlot = &macCb.macCell[cellIdx]->dlSlot[ulDciReqTimingInfo.slot % MAX_SLOTS];
+ currDlSlot = &macCb.macCell[cellIdx]->dlSlot[ulDciReqTimingInfo.slot % macCb.macCell[cellIdx]->numOfSlots];
LWR_MAC_ALLOC(ulDciElem, (sizeof(fapi_api_queue_elem_t) + sizeof(fapi_ul_dci_req_t)));
if(ulDciElem)