X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2F5gnrsch%2Fsch_utils.c;h=1f0035a250eaedccc401a89cccf825e1cc2d453a;hb=aa73421b9f5306c786cc5b757043b3d71705bbf2;hp=1397c65d85eeba7dc9bf4a535a93500c11e52e33;hpb=49dec2270f1b3c03b36a801e153bf0786edffc24;p=o-du%2Fl2.git diff --git a/src/5gnrsch/sch_utils.c b/src/5gnrsch/sch_utils.c index 1397c65d8..1f0035a25 100644 --- a/src/5gnrsch/sch_utils.c +++ b/src/5gnrsch/sch_utils.c @@ -448,7 +448,7 @@ void schAllocFreqDomRscType0(uint16_t startPrb, uint16_t prbSize, uint8_t *freqD { uint8_t remBits = prbSize; /* each bit represents 6 PRBs */ uint8_t firstByte = 1; - uint8_t numBits,startBit,byteCount = 0; + uint8_t numBits,startBit,byteCount = 5; while(remBits) { @@ -456,7 +456,7 @@ void schAllocFreqDomRscType0(uint16_t startPrb, uint16_t prbSize, uint8_t *freqD if(startPrb/8) { startPrb -= 8; - byteCount++; + byteCount--; continue; } @@ -477,12 +477,12 @@ void schAllocFreqDomRscType0(uint16_t startPrb, uint16_t prbSize, uint8_t *freqD numBits = 8 - startBit; /* bit operation to set the bits */ - SET_BITS((startBit % 8),numBits,freqDomain[byteCount]) + SET_BITS_MSB((startBit % 8),numBits,freqDomain[byteCount]) firstByte = 0; /* the ramaining bits should be subtracted with the numBits set in this byte */ remBits -= numBits; - byteCount++; + byteCount--; } }