X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2F5gnrsch%2Fsch_utils.c;h=3e8b23afd22ac6e73bb9ddb54abef3cbd38138ce;hb=HEAD;hp=63b4010a1a7840d7a1b6d1f184b597ab496c46b5;hpb=8acc76461815f24218fab9cfdc35f11f72aab36d;p=o-du%2Fl2.git diff --git a/src/5gnrsch/sch_utils.c b/src/5gnrsch/sch_utils.c index 63b4010a1..3e8b23afd 100644 --- a/src/5gnrsch/sch_utils.c +++ b/src/5gnrsch/sch_utils.c @@ -746,24 +746,25 @@ uint16_t mcsTable[32][3] = { { 31, 6, 0}}; /* mcs index 31 */ /* PUCCH resource sets before dedicated PUCCH resource configuration */ -/* Table 9.2.1-1 spec 38.213 */ -uint8_t pucchResourceSet[MAX_PUCCH_RES_SET_IDX][4] = { -{ 0, 12, 2, 0 }, /* index 0 */ -{ 0, 12, 2, 0 }, /* index 1 */ -{ 0, 12, 2, 3 }, /* index 2 */ -{ 1, 10, 4, 0 }, /* index 3 */ -{ 1, 10, 4, 0 }, /* index 4 */ -{ 1, 10, 4, 2 }, /* index 5 */ -{ 1, 10, 4, 4 }, /* index 6 */ -{ 1, 4, 10, 0 }, /* index 7 */ -{ 1, 4, 10, 0 }, /* index 8 */ -{ 1, 4, 10, 2 }, /* index 9 */ -{ 1, 4, 10, 4 }, /* index 10 */ -{ 1, 0, 14, 0 }, /* index 11 */ -{ 1, 0, 14, 0 }, /* index 12 */ -{ 1, 0, 14, 2 }, /* index 13 */ -{ 1, 0, 14, 4 }, /* index 14 */ -{ 1, 0, 14, 0 }, /* index 15 */ +/* Table 9.2.1-1 spec 38.213 */ +/*{PUCCH_Format, 1stSym, NumSym, PRBOffset, Num_CyclicShift}*/ +uint8_t pucchResourceSet[MAX_PUCCH_RES_SET_IDX][5] = { +{ 0, 12, 2, 0, 2 }, /* index 0 */ +{ 0, 12, 2, 0, 3 }, /* index 1 */ +{ 0, 12, 2, 3, 3 }, /* index 2 */ +{ 1, 10, 4, 0, 2 }, /* index 3 */ +{ 1, 10, 4, 0, 4 }, /* index 4 */ +{ 1, 10, 4, 2, 4 }, /* index 5 */ +{ 1, 10, 4, 4, 4 }, /* index 6 */ +{ 1, 4, 10, 0, 2 }, /* index 7 */ +{ 1, 4, 10, 0, 4 }, /* index 8 */ +{ 1, 4, 10, 2, 4 }, /* index 9 */ +{ 1, 4, 10, 4, 4 }, /* index 10 */ +{ 1, 0, 14, 0, 2 }, /* index 11 */ +{ 1, 0, 14, 0, 4 }, /* index 12 */ +{ 1, 0, 14, 2, 4 }, /* index 13 */ +{ 1, 0, 14, 4, 4 }, /* index 14 */ +{ 1, 0, 14, (MAX_NUM_RB/4), 4 }, /* index 15 */ }; /*CQI Table From Spec 38.214 Table 5.2.2.1-2 @@ -1198,6 +1199,7 @@ SchUeCb* schGetUeCb(SchCellCb *cellCb, uint16_t crnti) **/ void schInitUlSlot(SchUlSlotInfo *schUlSlotInfo) { + uint8_t ueIdx = 0; CmLList *node = NULLP, *next = NULLP; FreePrbBlock *freeBlock; @@ -1226,9 +1228,11 @@ void schInitUlSlot(SchUlSlotInfo *schUlSlotInfo) freeBlock->endPrb = MAX_NUM_RB-1; addNodeToLList(&schUlSlotInfo->prbAlloc.freePrbBlockList, freeBlock, NULL); } - - schUlSlotInfo->puschCurrentPrb = PUSCH_START_RB; - schUlSlotInfo->schPuschInfo = NULLP; + + for(ueIdx = 0; ueIdx < MAX_NUM_UE; ueIdx++) + { + schUlSlotInfo->schPuschInfo[ueIdx] = NULLP; + } } /** @@ -2112,12 +2116,14 @@ uint32_t schCalY(uint8_t csId, uint32_t prevY) uint8_t schUpdValY(SchUeCb *ueCb, SchPdcchInfo *pdcchInfo) { uint8_t slotIdx = 0; - - SCH_ALLOC(pdcchInfo->y, (sizeof(uint32_t) * ueCb->cellCb->numSlots)); if(pdcchInfo->y == NULLP) { - DU_LOG("\nERROR --> SCH: Memory Allocation of Y failed"); - return RFAILED; + SCH_ALLOC(pdcchInfo->y, (sizeof(uint32_t) * ueCb->cellCb->numSlots)); + if(pdcchInfo->y == NULLP) + { + DU_LOG("\nERROR --> SCH: Memory Allocation of Y failed"); + return RFAILED; + } } for(slotIdx= 0 ; slotIdx < ueCb->cellCb->numSlots; slotIdx++)