From a74989ccaec1042282eb2f35798853b50cf20225 Mon Sep 17 00:00:00 2001 From: "lal.harshita" Date: Thu, 26 Aug 2021 21:17:12 +0530 Subject: [PATCH] Bug in RACH IND trigger Change-Id: I939c193b08736120203a26378daec80474c3ae6f Signed-off-by: lal.harshita Signed-off-by: barveankit --- src/phy_stub/phy_stub.h | 3 +++ src/phy_stub/phy_stub_msg_hdl.c | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/phy_stub/phy_stub.h b/src/phy_stub/phy_stub.h index 577a5ab23..fab871291 100644 --- a/src/phy_stub/phy_stub.h +++ b/src/phy_stub/phy_stub.h @@ -25,6 +25,9 @@ #define MAX_SFN_VALUE 1023 #define NR_PCI 1 #define SLOT_DELAY 3 +/*UE Ids for RACH IND*/ +#define UE_IDX_0 0 +#define UE_IDX_1 1 bool slotIndicationStarted; uint16_t sfnValue; diff --git a/src/phy_stub/phy_stub_msg_hdl.c b/src/phy_stub/phy_stub_msg_hdl.c index dd361405c..8cd6217e0 100644 --- a/src/phy_stub/phy_stub_msg_hdl.c +++ b/src/phy_stub/phy_stub_msg_hdl.c @@ -1042,18 +1042,18 @@ S16 l1HdlUlTtiReq(uint16_t msgLen, void *msg) numPdus--; } - if(ueDb.ueCb[ueDb.numActvUe].rachIndSent == false && ulTtiReq->sfn == 16 && ulTtiReq->slot == 6) + if(ueDb.ueCb[UE_IDX_0].rachIndSent == false && ulTtiReq->sfn == 16 && ulTtiReq->slot == 6) { - ueDb.ueCb[ueDb.numActvUe].rachIndSent = true; + ueDb.ueCb[UE_IDX_0].rachIndSent = true; l1BuildAndSendRachInd(ulTtiReq->slot, ulTtiReq->sfn); ueDb.numActvUe++; } //Following can be enabled to test with a second UE #if 0 - if(ueDb.ueCb[ueDb.numActvUe].rachIndSent == false && ulTtiReq->sfn == 304 && ulTtiReq->slot == 0) + if(ueDb.ueCb[UE_IDX_1].rachIndSent == false && ulTtiReq->sfn == 304 && ulTtiReq->slot == 0) { - ueDb.ueCb[ueDb.numActvUe].rachIndSent = true; + ueDb.ueCb[UE_IDX_1].rachIndSent = true; l1BuildAndSendRachInd(ulTtiReq->slot, ulTtiReq->sfn); ueDb.numActvUe++; } -- 2.16.6