X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2F5gnrmac%2Fmac_msg_hdl.c;h=a3045336c6e4b549a581f8451df8b5b0aee648b3;hb=fe5d6711157dc1d3308a9754893b58b3872cd81a;hp=37755d8198fd39ae87e18e9bd922bc3e8281ab0d;hpb=9940b262cb8423e9af0f6a19cc1f3f6fd61eaacd;p=o-du%2Fl2.git diff --git a/src/5gnrmac/mac_msg_hdl.c b/src/5gnrmac/mac_msg_hdl.c index 37755d819..a3045336c 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); } @@ -772,10 +784,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) { @@ -790,8 +800,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: