Code Review
/
o-du
/
l2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Merge "[EPIC-ID: ODUHIGH-488][TASK-ID: ODUHIGH-494]SCH framework update to support...
[o-du/l2.git]
/
src
/
5gnrsch
/
sch_rach.c
diff --git
a/src/5gnrsch/sch_rach.c
b/src/5gnrsch/sch_rach.c
index
bf4c116
..
7694acb
100644
(file)
--- a/
src/5gnrsch/sch_rach.c
+++ b/
src/5gnrsch/sch_rach.c
@@
-42,13
+42,6
@@
#include "sch.h"
#include "sch_utils.h"
#include "sch.h"
#include "sch_utils.h"
-SchRachRsrcRspFunc SchRachRsrcRspOpts[] =
-{
- packSchRachRsrcRsp, /* LC */
- MacProcSchRachRsrcRsp, /* TC */
- packSchRachRsrcRsp /* LWLC */
-};
-
/**
* @brief Checks if PRACH can be scheduled in current slot
*
/**
* @brief Checks if PRACH can be scheduled in current slot
*
@@
-196,7
+189,7
@@
void schPrachResAlloc(SchCellCb *cell, UlSchedInfo *ulSchedInfo, SlotTimingInfo
*
* @details
*
*
* @details
*
- * Function :
MacSch
RachRsrcReq
+ * Function :
SchProc
RachRsrcReq
*
* This function processes RACH resorce request
* from MAC for CFRA. It assigns a dedicated preamble
*
* This function processes RACH resorce request
* from MAC for CFRA. It assigns a dedicated preamble
@@
-208,7
+201,7
@@
void schPrachResAlloc(SchCellCb *cell, UlSchedInfo *ulSchedInfo, SlotTimingInfo
* @return ROK
* RFAILED
**/
* @return ROK
* RFAILED
**/
-uint8_t
MacSch
RachRsrcReq(Pst *pst, SchRachRsrcReq *schRachRsrcReq)
+uint8_t
SchProc
RachRsrcReq(Pst *pst, SchRachRsrcReq *schRachRsrcReq)
{
uint8_t ssbIdx = 0, cfraSsbIdx = 0;
uint8_t firstCFPreambleIndex = 0, lastCFPreambleIndex = 0;
{
uint8_t ssbIdx = 0, cfraSsbIdx = 0;
uint8_t firstCFPreambleIndex = 0, lastCFPreambleIndex = 0;
@@
-335,7
+328,7
@@
uint8_t MacSchRachRsrcReq(Pst *pst, SchRachRsrcReq *schRachRsrcReq)
SCH_FREE(schRachRsrcReq, sizeof(SchRachRsrcReq));
/* Send RACH resource response to MAC */
SCH_FREE(schRachRsrcReq, sizeof(SchRachRsrcReq));
/* Send RACH resource response to MAC */
- return
(SchRachRsrcRspOpts[rspPst.selector](&rspPst,
rachRsrcRsp));
+ return
(MacMessageRouter(&rspPst, (void *)
rachRsrcRsp));
}
/**
}
/**
@@
-778,7
+771,7
@@
bool schProcessRaReq(Inst schInst, SchCellCb *cell, SlotTimingInfo currTime, uin
*
* @details
*
*
* @details
*
- * Function :
schProcess
RachInd
+ * Function :
SchProc
RachInd
*
* This function process rach indication
*
*
* This function process rach indication
*
@@
-786,17
+779,20
@@
bool schProcessRaReq(Inst schInst, SchCellCb *cell, SlotTimingInfo currTime, uin
* @param[in] shed instance
* @return ROK
**/
* @param[in] shed instance
* @return ROK
**/
-uint8_t
schProcessRachInd(RachIndInfo *rachInd, Inst schInst
)
+uint8_t
SchProcRachInd(Pst *pst, RachIndInfo *rachInd
)
{
{
- SchCellCb *cell = schCb[schInst].cells[schInst];
SchRaReq *raReq = NULLP;
SchRaReq *raReq = NULLP;
- float slotDuration;
- uint8_t winNumSlots;
- uint8_t ueId;
+ float slotDuration;
+ uint8_t winNumSlots;
+ uint8_t ueId;
+ Inst schInst = pst->dstInst-SCH_INST_START;
+ SchCellCb *cell = schCb[schInst].cells[schInst];
+
+ DU_LOG("\nINFO --> SCH : Received Rach indication");
if(cell == NULLP)
{
if(cell == NULLP)
{
- DU_LOG("\nERROR --> SCH: Failed to find cell in
schProcess
RachInd");
+ DU_LOG("\nERROR --> SCH: Failed to find cell in
SchProc
RachInd");
return RFAILED;
}
return RFAILED;
}
@@
-811,7
+807,7
@@
uint8_t schProcessRachInd(RachIndInfo *rachInd, Inst schInst)
SCH_ALLOC(raReq, sizeof(SchRaReq));
if(!raReq)
{
SCH_ALLOC(raReq, sizeof(SchRaReq));
if(!raReq)
{
- DU_LOG("\nERROR --> SCH : Memory allocation failure in
schProcess
RachInd");
+ DU_LOG("\nERROR --> SCH : Memory allocation failure in
SchProc
RachInd");
SCH_FREE(rachInd, sizeof(RachIndInfo));
return RFAILED;
}
SCH_FREE(rachInd, sizeof(RachIndInfo));
return RFAILED;
}
@@
-838,8
+834,7
@@
uint8_t schProcessRachInd(RachIndInfo *rachInd, Inst schInst)
cell->raReq[ueId -1] = raReq;
/* Adding UE Id to list of pending UEs to be scheduled */
cell->raReq[ueId -1] = raReq;
/* Adding UE Id to list of pending UEs to be scheduled */
- addUeToBeScheduled(cell, ueId);
-
+ cell->api->SchRachInd(cell, ueId);
return ROK;
}
return ROK;
}
@@
-1002,7
+997,7
@@
uint8_t schFillRar(SchCellCb *cell, SlotTimingInfo rarTime, uint16_t ueId, RarAl
*
* @details
*
*
* @details
*
- * Function :
MacSch
RachRsrcRel
+ * Function :
SchProc
RachRsrcRel
*
* This function processes RACH resorce release
* from MAC after CFRA. It releases the dedicated
*
* This function processes RACH resorce release
* from MAC after CFRA. It releases the dedicated
@@
-1013,7
+1008,7
@@
uint8_t schFillRar(SchCellCb *cell, SlotTimingInfo rarTime, uint16_t ueId, RarAl
* @return ROK
* RFAILED
*/
* @return ROK
* RFAILED
*/
-uint8_t
MacSch
RachRsrcRel(Pst *pst, SchRachRsrcRel *schRachRsrcRel)
+uint8_t
SchProc
RachRsrcRel(Pst *pst, SchRachRsrcRel *schRachRsrcRel)
{
uint8_t ret = ROK;
uint8_t ssbIdx = 0, cfraSsbIdx = 0;
{
uint8_t ret = ROK;
uint8_t ssbIdx = 0, cfraSsbIdx = 0;
@@
-1091,7
+1086,7
@@
void schMsg4Complete(SchUeCb *ueCb)
{
DU_LOG("\nINFO --> SCH: State change for ueId[%2d] to SCH_RA_STATE_MSG4_DONE\n",ueCb->ueId);
ueCb->cellCb->raCb[ueCb->ueId-1].raState = SCH_RA_STATE_MSG4_DONE;
{
DU_LOG("\nINFO --> SCH: State change for ueId[%2d] to SCH_RA_STATE_MSG4_DONE\n",ueCb->ueId);
ueCb->cellCb->raCb[ueCb->ueId-1].raState = SCH_RA_STATE_MSG4_DONE;
- ueCb->msg4Proc = ueCb->retxMsg4HqProc = NULLP;
+ ueCb->msg4
Hq
Proc = ueCb->retxMsg4HqProc = NULLP;
}
/**********************************************************************
End of file
}
/**********************************************************************
End of file