X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2F5gnrmac%2Fmac_rach.c;h=18a6200bf799e1b18aa275c4f8cb12e33053f7e1;hb=3ecca3e4e3a36a7f357a475bd4a938b0ac551e7c;hp=a0feae5b93cc18a128347b236b0cce5ca3611ee4;hpb=45d134510deb6902b870b4a0fb574b6075fba601;p=o-du%2Fl2.git diff --git a/src/5gnrmac/mac_rach.c b/src/5gnrmac/mac_rach.c index a0feae5b9..18a6200bf 100644 --- a/src/5gnrmac/mac_rach.c +++ b/src/5gnrmac/mac_rach.c @@ -29,7 +29,7 @@ MacSchRachIndFunc macSchRachIndOpts[]= { packMacSchRachInd, - macSchRachInd, + MacSchRachInd, packMacSchRachInd }; @@ -80,27 +80,26 @@ uint8_t fapiMacRachInd(Pst *pst, RachInd *rachInd) uint8_t preambleIdx; RachIndInfo rachIndInfo; - DU_LOG("\nMAC : Received RACH indication"); + DU_LOG("\nINFO --> MAC : Received RACH indication"); /* Considering one pdu and one preamble */ pduIdx = 0; preambleIdx = 0; - rachIndInfo.cellId = rachInd->rachPdu[pduIdx].pci; - /* TODO : A.ocate unique crnti for each ue */ - rachIndInfo.crnti = 100; + rachIndInfo.cellId = rachInd->cellId; rachIndInfo.timingInfo.sfn = rachInd->timingInfo.sfn; rachIndInfo.timingInfo.slot = rachInd->timingInfo.slot; rachIndInfo.slotIdx = rachInd->rachPdu[pduIdx].slotIdx; rachIndInfo.symbolIdx = rachInd->rachPdu[pduIdx].symbolIdx; rachIndInfo.freqIdx = rachInd->rachPdu[pduIdx].freqIdx; rachIndInfo.preambleIdx = \ - rachInd->rachPdu[pduIdx].preamInfo[preambleIdx].preamIdx; + rachInd->rachPdu[pduIdx].preamInfo[preambleIdx].preamIdx; rachIndInfo.timingAdv = \ - rachInd->rachPdu[pduIdx].preamInfo[preambleIdx].timingAdv; + rachInd->rachPdu[pduIdx].preamInfo[preambleIdx].timingAdv; /* storing the value in macRaCb */ - createMacRaCb(rachIndInfo.cellId, rachIndInfo.crnti); + createMacRaCb(&rachIndInfo); + MAC_FREE_SHRABL_BUF(pst->region, pst->pool, rachInd, sizeof(RachInd)); return(sendRachIndMacToSch(&rachIndInfo)); }