X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fphy_stub%2Fl1_bdy1.c;h=cedcc3cbf60c14578b36f8fb228070dd60e580e9;hb=1931d49496d91723b7c54c63db50ff4ee8ff03b6;hp=9bb83622401e73dfb1bb22a592c374b03e38601e;hpb=ee769160fe5360f0d3ea043deaede2902ae13073;p=o-du%2Fl2.git diff --git a/src/phy_stub/l1_bdy1.c b/src/phy_stub/l1_bdy1.c index 9bb836224..cedcc3cbf 100644 --- a/src/phy_stub/l1_bdy1.c +++ b/src/phy_stub/l1_bdy1.c @@ -333,7 +333,7 @@ uint16_t l1BuildAndSendCrcInd(uint16_t slot, uint16_t sfn) return ROK; } /* l1BuildAndSendCrcInd */ - +#ifdef FAPI /******************************************************************* * * @brief Build and send Rx data indication @@ -351,9 +351,8 @@ uint16_t l1BuildAndSendCrcInd(uint16_t slot, uint16_t sfn) * RFAILED - failure * * ****************************************************************/ -uint16_t l1BuildAndSendRxDataInd(uint16_t slot, uint16_t sfn) +uint16_t l1BuildAndSendRxDataInd(uint16_t slot, uint16_t sfn, fapi_ul_pusch_pdu_t puschPdu) { -#ifdef FAPI uint8_t idx = 0; fapi_rx_data_indication_t *rxDataInd; fapi_pdu_ind_info_t *pduInfo; @@ -373,10 +372,10 @@ uint16_t l1BuildAndSendRxDataInd(uint16_t slot, uint16_t sfn) rxDataInd->numPdus = 1; pduInfo = &rxDataInd->pdus[idx]; - pduInfo->handle = 0; - pduInfo->rnti = 0; - pduInfo->harqId = 0; - pduInfo->pduLength = 24; + pduInfo->handle = puschPdu.handle; + pduInfo->rnti = puschPdu.rnti; + pduInfo->harqId = puschPdu.puschData.harqProcessId; + pduInfo->pduLength = puschPdu.puschData.tbSize; pduInfo->ul_cqi = 0; pduInfo->timingAdvance = 0; pduInfo->rssi = 0; @@ -416,10 +415,9 @@ uint16_t l1BuildAndSendRxDataInd(uint16_t slot, uint16_t sfn) if(pduInfo->pduLength) MAC_FREE(pduInfo->pduData, pduInfo->pduLength); MAC_FREE(rxDataInd, sizeof(fapi_rx_data_indication_t)); -#endif return ROK; } - +#endif /******************************************************************* * @@ -597,7 +595,7 @@ PUBLIC S16 l1HdlDlTtiReq(uint16_t msgLen, void *msg) fapi_dl_tti_req_t *dlTtiReq; dlTtiReq = (fapi_dl_tti_req_t *)msg; - printf("\nPHY STUB: Received DL TTI Request"); + printf("\nPHY STUB: DL TTI Request at sfn=%d slot=%d",dlTtiReq->sfn,dlTtiReq->slot); #if 0 printf("\nPHY_STUB: SFN %d", dlTtiReq->sfn); printf("\nPHY_STUB: SLOT %d", dlTtiReq->slot); @@ -658,7 +656,7 @@ PUBLIC S16 l1HdlTxDataReq(uint16_t msgLen, void *msg) fapi_tx_data_req_t *txDataReq; txDataReq = (fapi_tx_data_req_t *)msg; - DU_LOG("\nPHY STUB: Received TX DATA Request"); + DU_LOG("\nPHY STUB: TX DATA Request at sfn=%d slot=%d",txDataReq->sfn,txDataReq->slot); MAC_FREE(txDataReq, msgLen); #endif @@ -699,7 +697,19 @@ PUBLIC S16 l1HdlUlTtiReq(uint16_t msgLen, void *msg) while(numPdus) { if(ulTtiReq->pdus[numPdus-1].pduType == 0) + { DU_LOG("\nPHY STUB: PRACH PDU"); + } + if(ulTtiReq->pdus[numPdus-1].pduType == 1) + { + DU_LOG("\nPHY STUB: PUSCH PDU"); + l1BuildAndSendRxDataInd(ulTtiReq->slot, ulTtiReq->sfn, \ + ulTtiReq->pdus[numPdus-1].u.pusch_pdu); + } + if(ulTtiReq->pdus[numPdus-1].pduType == 2) + { + DU_LOG("\nPHY STUB: PUCCH PDU"); + } numPdus--; }