+ case MAC_LCID_MIN ... MAC_LCID_MAX :
+ {
+ DU_LOG("\nMAC : PDU received for LC ID %d", lcId);
+
+ pduLen--;
+ idx++;
+
+ length = rxDataPdu[idx];
+ if(fBit)
+ {
+ pduLen--;
+ idx++;
+ length = (length << 8) & rxDataPdu[idx];
+ }
+
+ /* Copying the payload to send to RLC */
+ MAC_ALLOC_SHRABL_BUF(pdu, length);
+ if(!pdu)
+ {
+ DU_LOG("\nMAC : Memory allocation failed while demuxing Rx Data PDU");
+ return RFAILED;
+ }
+ pduLen--;
+ idx++;
+ memcpy(pdu, &rxDataPdu[idx], length);
+ pduLen -= length;
+ idx = idx + 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);
+ memset(&macCb.macCell[cellIdx]->macRaCb[ueIdx], 0, sizeof(MacRaCbInfo));
+ }
+
+ /* Send UL Data to RLC */
+ ret = macProcUlData(cellId, rxDataIndPdu->rnti, slotInfo, lcId, length, pdu);