X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2F5gnrmac%2Fmac_msg_hdl.c;h=e8ba97385ccece32a4d29c2446557e48831feaf2;hb=84670fed17a640ca68c199055b740c41f04c9f4d;hp=e59e9bb19801e784be8b3f041df7fc7e5e51d987;hpb=16c5580481ed94b84e92d0a22874cf476debf17e;p=o-du%2Fl2.git diff --git a/src/5gnrmac/mac_msg_hdl.c b/src/5gnrmac/mac_msg_hdl.c index e59e9bb19..e8ba97385 100644 --- a/src/5gnrmac/mac_msg_hdl.c +++ b/src/5gnrmac/mac_msg_hdl.c @@ -186,14 +186,26 @@ uint8_t fapiMacCrcInd(Pst *pst, CrcInd *crcInd) * ****************************************************************/ uint8_t fapiMacRxDataInd(Pst *pst, RxDataInd *rxDataInd) { - uint16_t pduIdx; + uint8_t ueId = 0; + uint16_t pduIdx, cellIdx = 0; DU_LOG("\nDEBUG --> MAC : Received Rx Data indication"); /* TODO : compare the handle received in RxDataInd with handle send in PUSCH * PDU, which is stored in raCb */ for(pduIdx = 0; pduIdx < rxDataInd->numPdus; pduIdx++) { - unpackRxData(rxDataInd->cellId, rxDataInd->timingInfo, &rxDataInd->pdus[pduIdx]); + + GET_CELL_IDX(rxDataInd->cellId, cellIdx); + GET_UE_ID(rxDataInd->pdus[pduIdx].rnti, ueId); + + if(macCb.macCell[cellIdx] && macCb.macCell[cellIdx]->ueCb[ueId -1].transmissionAction == STOP_TRANSMISSION) + { + DU_LOG("\nINFO --> MAC : UL data transmission not allowed for UE %d", macCb.macCell[cellIdx]->ueCb[ueId -1].duUeF1apId); + } + else + { + unpackRxData(rxDataInd->cellId, rxDataInd->timingInfo, &rxDataInd->pdus[pduIdx]); + } MAC_FREE_SHRABL_BUF(pst->region, pst->pool, rxDataInd->pdus[pduIdx].pduData,\ rxDataInd->pdus[pduIdx].pduLength); } @@ -771,10 +783,8 @@ uint8_t buildAndSendSrInd(UciInd *macUciInd, uint8_t crnti) * ****************************************************************/ uint8_t FapiMacUciInd(Pst *pst, UciInd *macUciInd) { - uint8_t pduIdx = 0; - uint8_t ret = ROK; - uint16_t nPdus; - uint16_t crnti; + uint8_t pduIdx = 0, ret = ROK; + uint16_t nPdus = 0, crnti = 0; if(macUciInd) { @@ -789,8 +799,8 @@ uint8_t FapiMacUciInd(Pst *pst, UciInd *macUciInd) if(macUciInd->pdus[pduIdx].uci.uciPucchF0F1.srInfo.srIndPres) { DU_LOG("\nDEBUG --> MAC : Received SR UCI indication"); - crnti = macUciInd->pdus[pduIdx].uci.uciPucchF0F1.crnti; - ret = buildAndSendSrInd(macUciInd, crnti); + crnti = macUciInd->pdus[pduIdx].uci.uciPucchF0F1.crnti; + ret = buildAndSendSrInd(macUciInd, crnti); } break; case UCI_IND_PUCCH_F2F3F4: