X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2F5gnrmac%2Fmac_msg_hdl.c;h=509b04ff357dca5acf96b678689e914d98c208a6;hb=refs%2Fchanges%2F49%2F12949%2F3;hp=f5e6649ff2fe07946034bef75574c555f3376da5;hpb=904a5d446b480d71da1bf81f892bab86ab365ce6;p=o-du%2Fl2.git diff --git a/src/5gnrmac/mac_msg_hdl.c b/src/5gnrmac/mac_msg_hdl.c index f5e6649ff..509b04ff3 100644 --- a/src/5gnrmac/mac_msg_hdl.c +++ b/src/5gnrmac/mac_msg_hdl.c @@ -36,7 +36,7 @@ /* This file contains message handling functionality for MAC */ -MacCb macCb; +extern MacCb macCb; MacDuStatsIndFunc macDuStatsIndOpts[] = { @@ -514,7 +514,7 @@ uint8_t sendSchedRptToRlc(DlSchedInfo dlInfo, SlotTimingInfo slotInfo, uint8_t u uint8_t MacProcCellStart(Pst *pst, CellStartInfo *cellStart) { DU_LOG("\nINFO --> MAC : Handling cell start request"); - gSlotCount = 0; + gConfigInfo.gSlotCount = 0; sendToLowerMac(START_REQUEST, 0, cellStart); MAC_FREE_SHRABL_BUF(pst->region, pst->pool, cellStart, \ @@ -1081,6 +1081,7 @@ uint8_t MacProcSliceRecfgReq(Pst *pst, MacSliceRecfgReq *macSliceRecfgReq) **/ uint8_t MacProcSchStatsInd(Pst *pst, SchStatsInd *schStatsInd) { + uint8_t statsIdx = 0; Pst indPst; MacStatsInd *macStatsInd; @@ -1101,26 +1102,34 @@ uint8_t MacProcSchStatsInd(Pst *pst, SchStatsInd *schStatsInd) return RFAILED; } - switch(schStatsInd->type) + macStatsInd->subscriptionId = schStatsInd->subscriptionId; + macStatsInd->groupId = schStatsInd->groupId; + + for(statsIdx = 0; statsIdx < schStatsInd->numStats; statsIdx++) { - case SCH_DL_TOTAL_PRB_USAGE: - { - macStatsInd->type = MAC_DL_TOTAL_PRB_USAGE; - break; - } - case SCH_UL_TOTAL_PRB_USAGE: - { - macStatsInd->type = MAC_UL_TOTAL_PRB_USAGE; - break; - } - default: - { - DU_LOG("\nERROR --> MAC : MacProcSchStatsInd: Invalid measurement type [%d]", schStatsInd->type); - MAC_FREE_SHRABL_BUF(MAC_MEM_REGION, MAC_POOL, macStatsInd, sizeof(MacStatsInd)); - return RFAILED; - } + switch(schStatsInd->measuredStatsList[statsIdx].type) + { + case SCH_DL_TOTAL_PRB_USAGE: + { + macStatsInd->measuredStatsList[statsIdx].type = MAC_DL_TOTAL_PRB_USAGE; + break; + } + case SCH_UL_TOTAL_PRB_USAGE: + { + macStatsInd->measuredStatsList[statsIdx].type = MAC_UL_TOTAL_PRB_USAGE; + break; + } + default: + { + DU_LOG("\nERROR --> MAC : MacProcSchStatsInd: Invalid measurement type [%d]", \ + schStatsInd->measuredStatsList[statsIdx].type); + MAC_FREE_SHRABL_BUF(MAC_MEM_REGION, MAC_POOL, macStatsInd, sizeof(MacStatsInd)); + return RFAILED; + } + } + macStatsInd->measuredStatsList[statsIdx].value = schStatsInd->measuredStatsList[statsIdx].value; } - macStatsInd->value = schStatsInd->value; + macStatsInd->numStats = schStatsInd->numStats; memset(&indPst, 0, sizeof(Pst)); FILL_PST_MAC_TO_DUAPP(indPst, EVENT_MAC_STATISTICS_IND);