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
Rach Indication
[o-du/l2.git]
/
src
/
5gnrsch
/
sch_slot_ind.c
diff --git
a/src/5gnrsch/sch_slot_ind.c
b/src/5gnrsch/sch_slot_ind.c
index
47346c3
..
5582475
100644
(file)
--- a/
src/5gnrsch/sch_slot_ind.c
+++ b/
src/5gnrsch/sch_slot_ind.c
@@
-114,10
+114,13
@@
int sendDlBrdcstAllocToMac(DlBrdcstAlloc *dlBrdcstAlloc, Inst inst)
* RFAILED - failure
*
* ****************************************************************/
* RFAILED - failure
*
* ****************************************************************/
-
uint8_
t schProcessSlotInd(SlotIndInfo *slotInd, Inst schInst)
+
in
t schProcessSlotInd(SlotIndInfo *slotInd, Inst schInst)
{
int ret = ROK;
uint8_t ssb_rep;
{
int ret = ROK;
uint8_t ssb_rep;
+ uint16_t sfn = slotInd->sfn;
+ uint16_t slot = slotInd->slot;
+ uint16_t sfnSlot = 0;
DlBrdcstAlloc dlBrdcstAlloc;
dlBrdcstAlloc.ssbTrans = NO_SSB;
dlBrdcstAlloc.sib1Trans = NO_SIB1;
DlBrdcstAlloc dlBrdcstAlloc;
dlBrdcstAlloc.ssbTrans = NO_SSB;
dlBrdcstAlloc.sib1Trans = NO_SIB1;
@@
-128,13
+131,22
@@
uint8_t schProcessSlotInd(SlotIndInfo *slotInd, Inst schInst)
#endif
cell = schCb[schInst].cells[schInst];
#endif
cell = schCb[schInst].cells[schInst];
+// schDlResAlloc(cell, slotInd);
+
ssb_rep = cell->cellCfg.ssbSchCfg.ssbPeriod;
memcpy(&cell->slotInfo, slotInd, sizeof(SlotIndInfo));
ssb_rep = cell->cellCfg.ssbSchCfg.ssbPeriod;
memcpy(&cell->slotInfo, slotInd, sizeof(SlotIndInfo));
- memcpy(&dlBrdcstAlloc.slotIndInfo, slotInd, sizeof(SlotIndInfo));
dlBrdcstAlloc.cellId = cell->cellId;
dlBrdcstAlloc.ssbIdxSupported = 1;
dlBrdcstAlloc.cellId = cell->cellId;
dlBrdcstAlloc.ssbIdxSupported = 1;
- uint16_t sfnSlot = (slotInd->sfn * 10) + slotInd->slot;
+ if((slot + SCHED_DELTA) >= 10)
+ {
+ sfn++;
+ }
+ slot = ((slot + SCHED_DELTA) % 10 );
+ sfnSlot = ((sfn * 10) + slot);
+
+ dlBrdcstAlloc.slotIndInfo.sfn = sfn;
+ dlBrdcstAlloc.slotIndInfo.slot = slot;
/* Identify SSB ocassion*/
if (sfnSlot % SCH_MIB_TRANS == 0)
/* Identify SSB ocassion*/
if (sfnSlot % SCH_MIB_TRANS == 0)
@@
-173,7
+185,6
@@
uint8_t schProcessSlotInd(SlotIndInfo *slotInd, Inst schInst)
RETVALUE(ret);
}
}
RETVALUE(ret);
}
}
-
//send msg to MAC
ret = sendDlBrdcstAllocToMac(&dlBrdcstAlloc, schInst);
if(ret != ROK)
//send msg to MAC
ret = sendDlBrdcstAllocToMac(&dlBrdcstAlloc, schInst);
if(ret != ROK)
@@
-181,6
+192,8
@@
uint8_t schProcessSlotInd(SlotIndInfo *slotInd, Inst schInst)
DU_LOG("\nSending DL Broadcast allocation from SCH to MAC failed");
RETVALUE(ret);
}
DU_LOG("\nSending DL Broadcast allocation from SCH to MAC failed");
RETVALUE(ret);
}
+
+ schUlResAlloc(cell, schInst);
return ret;
}
return ret;
}