X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=src%2F5gnrmac%2Fmac_cfg_hdl.c;h=ac05143dcf3f6680cb17b8c6aa61e90d8bbdd828;hb=bf5434b9c6c179180c5bc37640ed700b1a4cbfa7;hp=69591c48849cdabd06aa2b763501ca0b2f27c103;hpb=f3638e5eecd563d0a02488afe54a6bf19b52ffad;p=o-du%2Fl2.git diff --git a/src/5gnrmac/mac_cfg_hdl.c b/src/5gnrmac/mac_cfg_hdl.c index 69591c488..ac05143dc 100644 --- a/src/5gnrmac/mac_cfg_hdl.c +++ b/src/5gnrmac/mac_cfg_hdl.c @@ -500,7 +500,7 @@ void fapiMacConfigRsp(uint16_t cellId) * RFAILED - failure * * ****************************************************************/ -uint8_t MacSendCellDeleteRsp(CellDeleteStatus result, uint8_t cellId) +uint8_t MacSendCellDeleteRsp(CauseOfResult status, uint8_t cellId) { MacCellDeleteRsp *deleteRsp=NULLP; Pst rspPst; @@ -516,7 +516,7 @@ uint8_t MacSendCellDeleteRsp(CellDeleteStatus result, uint8_t cellId) memset(deleteRsp, 0, sizeof(MacCellDeleteRsp)); deleteRsp->cellId = cellId; - deleteRsp->result = result; + deleteRsp->status = status; /* Fill Post structure and send CELL delete response*/ memset(&rspPst, 0, sizeof(Pst)); @@ -545,7 +545,7 @@ uint8_t MacProcSchCellDeleteRsp(Pst *pst, SchCellDeleteRsp *schCellDelRsp) { uint8_t ret = ROK, sliceIdx = 0, plmnIdx = 0; uint16_t cellIdx=0; - CellDeleteStatus status; + CauseOfResult cause; #ifdef CALL_FLOW_DEBUG_LOG DU_LOG("\nCall Flow: ENTSCH -> ENTMAC : EVENT_CELL_DELETE_RSP_TO_MAC\n"); @@ -562,7 +562,7 @@ uint8_t MacProcSchCellDeleteRsp(Pst *pst, SchCellDeleteRsp *schCellDelRsp) { if(macCb.macCell[cellIdx]->cellId == schCellDelRsp->cellId) { - status = SUCCESSFUL_RSP; + cause = SUCCESSFUL; for(plmnIdx = 0; plmnIdx < MAX_PLMN; plmnIdx++) { if(macCb.macCell[cellIdx]->macCellCfg.cellCfg.plmnInfoList[plmnIdx].snssai) @@ -582,24 +582,24 @@ uint8_t MacProcSchCellDeleteRsp(Pst *pst, SchCellDeleteRsp *schCellDelRsp) else { DU_LOG("ERROR --> MAC : MacProcSchCellDeleteRsp(): CellId[%d] does not exists", schCellDelRsp->cellId); - status = CELL_ID_INVALID; + cause = CELLID_INVALID; ret = RFAILED; } } else { DU_LOG("ERROR --> MAC : MacProcSchCellDeleteRsp(): CellId[%d] does not exists", schCellDelRsp->cellId); - status = CELL_ID_INVALID; + cause = CELLID_INVALID; ret = RFAILED; } } else { DU_LOG("ERROR --> MAC : MacProcSchCellDeleteRsp(): CellId[%d] does not exists", schCellDelRsp->cellId); - status = CELL_ID_INVALID; + cause = CELLID_INVALID; ret = RFAILED; } - if(MacSendCellDeleteRsp(status, schCellDelRsp->cellId) != ROK) + if(MacSendCellDeleteRsp(cause, schCellDelRsp->cellId) != ROK) { DU_LOG("\nERROR --> MAC: MacProcSchCellDeleteRsp(): Failed to send CELL delete response"); ret = RFAILED; @@ -693,7 +693,7 @@ uint8_t MacProcCellDeleteReq(Pst *pst, MacCellDeleteReq *cellDelete) if(ret == RFAILED) { DU_LOG("\nERROR --> MAC : MacProcCellDeleteReq(): Sending failure response to DU"); - if(MacSendCellDeleteRsp(CELL_ID_INVALID, cellDelete->cellId) != ROK) + if(MacSendCellDeleteRsp(CELLID_INVALID, cellDelete->cellId) != ROK) { DU_LOG("\nERROR --> MAC : MacProcCellDeleteReq(): failed to send cell delete rsp for cellID[%d]",\ cellDelete->cellId); @@ -961,6 +961,55 @@ uint8_t MacProcDlPcchInd(Pst *pst, DlPcchInd *pcchInd) } return ret; } + +/** + * @brief Mac process the downlink Broadcast Req received from DUAPP + * + * @details + * + * Function : MacProcDlBroadcastReq + * + * This function process the downlink Broadcast Req received from DUAPP + * + * @param[in] Pst *pst + * @param[in] DlBroadcastReq *dlBroadcastReq + * @return int + * -# ROK + **/ +uint8_t MacProcDlBroadcastReq(Pst *pst, MacDlBroadcastReq *dlBroadcastReq) +{ + uint8_t ret = ROK, idx=0; + uint16_t cellIdx = 0; + + if(dlBroadcastReq) + { + DU_LOG("\nINFO --> MAC : Received DL braodcast req from DU_APP for cellId[%d]", dlBroadcastReq->cellId); + + GET_CELL_IDX(dlBroadcastReq->cellId, cellIdx); + + if(macCb.macCell[cellIdx] == NULLP || macCb.macCell[cellIdx]->cellId != dlBroadcastReq->cellId) + { + ret = RFAILED; + DU_LOG("\nERROR --> MAC : MacProcDlBroadcastReq(): CellId[%d] does not exist", dlBroadcastReq->cellId); + } + else + { + /*TODO - Complete the processing of DL Broadcast Request*/ + } + for(idx = 0; idxnumSiBlock; idx++) + { + MAC_FREE_SHRABL_BUF(pst->region, pst->pool, dlBroadcastReq->siSchedulingInfo[idx]->siAreaID, sizeof(uint8_t)); + MAC_FREE_SHRABL_BUF(pst->region, pst->pool, dlBroadcastReq->siSchedulingInfo[idx], sizeof(SiSchedulingInfo)); + } + MAC_FREE_SHRABL_BUF(pst->region, pst->pool, dlBroadcastReq, sizeof(MacDlBroadcastReq)); + } + else + { + ret = RFAILED; + DU_LOG("\nERROR --> MAC : MacProcDlBroadcastReq(): Received Null pointer"); + } + return ret; +} /********************************************************************** End of file **********************************************************************/