[Epic-ID: ODUHIGH-405][Task-ID: ODUHIGH-420] GNB-DU Configuration Query and response
[o-du/l2.git] / src / phy_stub / phy_stub_msg_hdl.c
index 1d03573..03ac61b 100644 (file)
@@ -349,7 +349,7 @@ uint16_t l1BuildAndSendRxDataInd(uint16_t slot, uint16_t sfn, fapi_ul_pusch_pdu_
    uint32_t msgLen = 0;
    MsgType type = 0;
 
-   GET_UE_IDX(puschPdu.rnti, ueId);
+   GET_UE_ID(puschPdu.rnti, ueId);
    if(!ueDb.ueCb[ueId-1].msg3Sent)
    {
       ueDb.ueCb[ueId-1].ueId = ueId;
@@ -1051,6 +1051,7 @@ S16 l1HdlUlTtiReq(uint16_t msgLen, void *msg)
       l1BuildAndSendRachInd(ulTtiReq->slot, ulTtiReq->sfn);
       ueDb.numActvUe++;
    }
+#if 0
    /* Send RACH Ind to L2 for second UE */
    if(ueDb.ueCb[UE_IDX_1].rachIndSent == false && ulTtiReq->sfn == 304 && ulTtiReq->slot == 0)
    {
@@ -1066,6 +1067,7 @@ S16 l1HdlUlTtiReq(uint16_t msgLen, void *msg)
       l1BuildAndSendRachInd(ulTtiReq->slot, ulTtiReq->sfn);
       ueDb.numActvUe++;
    }
+#endif
    MAC_FREE(msg, msgLen);
 #endif
    return ROK;
@@ -1326,7 +1328,7 @@ S16 l1HdlUlDciReq(uint16_t msgLen, void *msg)
  *         RFAILED - failure
  *
  * ****************************************************************/
-uint8_t l1SendUlUserData(uint8_t drbId)
+uint8_t l1SendUlUserData(uint8_t drbId, uint8_t ueIdx)
 {
    uint8_t cnt = 0;
    fapi_rx_data_indication_t *rxDataInd;
@@ -1352,8 +1354,8 @@ uint8_t l1SendUlUserData(uint8_t drbId)
 
    /* TODO : Fill pduInfo using PUSCH PDU. Currently hardcoding */
    pduInfo = &rxDataInd->pdus[idx];
-   pduInfo->handle = 100;
-   pduInfo->rnti = 100;
+   pduInfo->handle = ueIdx + ODU_START_CRNTI;
+   pduInfo->rnti = ueIdx + ODU_START_CRNTI;
    pduInfo->harqId = 1;
    /* Since user data size = 50bytes and 2 bytes of MAC header and 3 byte of RLC header, 
     * setting tbsize = 56 from Table 5.1.3.2-1 spec 38.214 */