X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2F5gnrmac%2Fmac_mux.c;h=18167d7013cc8dfd546ece2e446462603b0a4ee8;hb=efd3fd582205e5c94878e6bcae6d6282dd6f1d25;hp=a72639579991e4f9ba6e1438dcf6430c91937759;hpb=ba2574ac618b40905509604da8d3a2b1b9e39664;p=o-du%2Fl2.git diff --git a/src/5gnrmac/mac_mux.c b/src/5gnrmac/mac_mux.c index a72639579..18167d701 100644 --- a/src/5gnrmac/mac_mux.c +++ b/src/5gnrmac/mac_mux.c @@ -42,7 +42,7 @@ * @return void * * ****************************************************************/ -void packBytes(uint8_t *buf, uint8_t *bytePos, uint8_t *bitPos, uint32_t val, uint8_t valSize) +void packBytes(uint8_t *buf, uint16_t *bytePos, uint8_t *bitPos, uint32_t val, uint8_t valSize) { uint32_t temp; uint8_t bytePart1; @@ -99,7 +99,7 @@ void fillRarPdu(RarInfo *rarInfo) uint8_t *rarPdu = rarInfo->rarPdu; uint16_t totalBits = 0; uint8_t numBytes = 0; - uint8_t bytePos= 0; + uint16_t bytePos= 0; uint8_t bitPos = 0; /* RAR subheader fields */ @@ -278,7 +278,7 @@ void fillMacCe(MacCeInfo *macCeInfo, uint8_t *msg3Pdu) void macMuxPdu(MacDlData *dlData, MacCeInfo *macCeData, uint8_t *txPdu, uint16_t tbSize) { - uint8_t bytePos = 0; + uint16_t bytePos = 0; uint8_t bitPos = 7; uint8_t idx = 0; uint8_t macPdu[tbSize]; @@ -315,7 +315,7 @@ void macMuxPdu(MacDlData *dlData, MacCeInfo *macCeData, uint8_t *txPdu, uint16_t break; } default: - DU_LOG("\n MAC: Invalid LCID %d in mac pdu",lcid); + DU_LOG("\nERROR --> MAC: Invalid LCID %d in mac pdu",lcid); break; } } @@ -353,10 +353,9 @@ void macMuxPdu(MacDlData *dlData, MacCeInfo *macCeData, uint8_t *txPdu, uint16_t } default: - DU_LOG("\n MAC: Invalid LCID %d in mac pdu",lcid); + DU_LOG("\nERROR --> MAC: Invalid LCID %d in mac pdu",lcid); break; } - } if(bytePos < tbSize && (tbSize-bytePos >= 1)) {