X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2F5gnrmac%2Fmac_demux.c;h=02b9e113b94439c273970e0ae541a8bcc10290e8;hb=e54c2aae19e97065def9e5ab2d1488477b1ea209;hp=a54228dd5c1613a8c30494d5663ce8529c59260e;hpb=d97caa5d16b9c6a2960a3b6d94d7737b7263004b;p=o-du%2Fl2.git diff --git a/src/5gnrmac/mac_demux.c b/src/5gnrmac/mac_demux.c index a54228dd5..02b9e113b 100644 --- a/src/5gnrmac/mac_demux.c +++ b/src/5gnrmac/mac_demux.c @@ -46,10 +46,11 @@ * ****************************************************************/ uint8_t unpackRxData(uint16_t cellId, SlotTimingInfo slotInfo, RxDataIndPdu *rxDataIndPdu) { + uint8_t ueId = 0; /* UE Identity */ uint8_t ueIdx = 0; /* Iterator for UE list */ uint8_t lcId = 0; /* LC ID of a sub pdu */ uint8_t fBit = 0; /* Value of F Bit in MAC sub-header */ - uint8_t rxPduIdx = 0; /* Iterator for received PDU */ + uint8_t rxPduIdx = 0; /* Iterator for received PDU */ uint16_t length = 0; /* Length of payload in a sub-PDU */ uint8_t *pdu = NULLP; /* Payload in sub-PDU */ uint16_t pduLen = 0; /* Length of undecoded PDU */ @@ -72,8 +73,8 @@ uint8_t unpackRxData(uint16_t cellId, SlotTimingInfo slotInfo, RxDataIndPdu *rxD } pduLen = rxDataIndPdu->pduLength; rxDataPdu = rxDataIndPdu->pduData; - GET_UE_IDX(rxDataIndPdu->rnti, ueIdx); - ueIdx = ueIdx -1; + GET_UE_ID(rxDataIndPdu->rnti, ueId); + ueIdx = ueId -1; while(pduLen > 0) { @@ -142,16 +143,6 @@ uint8_t unpackRxData(uint16_t cellId, SlotTimingInfo slotInfo, RxDataIndPdu *rxD pduLen -= length; rxPduIdx = rxPduIdx + length; - /* Delete RA cb once RRC setup complete received */ - if(macCb.macCell[cellIdx]->macRaCb[ueIdx].crnti == rxDataIndPdu->rnti) - { - MAC_FREE(macCb.macCell[cellIdx]->macRaCb[ueIdx].msg4Pdu, \ - macCb.macCell[cellIdx]->macRaCb[ueIdx].msg4PduLen); - MAC_FREE(macCb.macCell[cellIdx]->macRaCb[ueIdx].msg4TxPdu, \ - macCb.macCell[cellIdx]->macRaCb[ueIdx].msg4TbSize - TX_PAYLOAD_HDR_LEN); - memset(&macCb.macCell[cellIdx]->macRaCb[ueIdx], 0, sizeof(MacRaCbInfo)); - } - /* Send UL Data to RLC */ ret = macProcUlData(cellId, rxDataIndPdu->rnti, slotInfo, lcId, length, pdu); @@ -191,7 +182,7 @@ uint8_t unpackRxData(uint16_t cellId, SlotTimingInfo slotInfo, RxDataIndPdu *rxD { uint8_t lcgId = 0; uint8_t bufferSizeIdx = 0; - uint8_t crnti = 0; + uint16_t crnti = 0; uint32_t bufferSize = 0; pduLen--; @@ -216,7 +207,7 @@ uint8_t unpackRxData(uint16_t cellId, SlotTimingInfo slotInfo, RxDataIndPdu *rxD DataVolInfo dataVolInfo[MAX_NUM_LOGICAL_CHANNEL_GROUPS]; memset(dataVolInfo, 0,MAX_NUM_LOGICAL_CHANNEL_GROUPS * sizeof(DataVolInfo)); uint8_t lcgIdx = 0; - uint8_t crnti = 0; + uint16_t crnti = 0; uint8_t numLcg = 0; uint8_t lcgIdxPos = 0; pduLen--;