X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2F5gnrmac%2Fmac_cfg_hdl.c;h=ac05143dcf3f6680cb17b8c6aa61e90d8bbdd828;hb=06d59b32a05502c79a83de50d72c4c9bc7245c23;hp=1af9b0b0b83fe1b8eee9f18887b58ce5a480ff72;hpb=fed126358e8ddf1cb94f28740eb668b665685ea9;p=o-du%2Fl2.git diff --git a/src/5gnrmac/mac_cfg_hdl.c b/src/5gnrmac/mac_cfg_hdl.c index 1af9b0b0b..ac05143dc 100644 --- a/src/5gnrmac/mac_cfg_hdl.c +++ b/src/5gnrmac/mac_cfg_hdl.c @@ -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 **********************************************************************/