X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fdu_app%2Fdu_msg_hdl.c;h=054a2a9c6fd10647639c6916f33a416675eff73f;hb=392607b7a8cbf1b7415b15517275dd1ef4e897a9;hp=199ba76ada39025448d72106c1d2797f13be5a68;hpb=105199ef642ffe9736ea24a01d4546578fa25e60;p=o-du%2Fl2.git diff --git a/src/du_app/du_msg_hdl.c b/src/du_app/du_msg_hdl.c index 199ba76ad..054a2a9c6 100644 --- a/src/du_app/du_msg_hdl.c +++ b/src/du_app/du_msg_hdl.c @@ -355,6 +355,7 @@ S16 duProcCfgComplete() nci = (U16)cell->cellInfo.nrEcgi.cellId; duCb.cfgCellLst[nci-1] = cell; + duCb.numCfgCells++; } } if(ret != RFAILED) @@ -1549,7 +1550,7 @@ S16 duBuildAndSendMacCellCfg() DU_SET_ZERO(&pst, sizeof(Pst)); MacCellCfg *duMacCellCfg = NULLP; - DU_ALLOC(duMacCellCfg, sizeof(MacCellCfg)); + DU_ALLOC_SHRABL_BUF(duMacCellCfg, sizeof(MacCellCfg)); if(duMacCellCfg == NULLP) { return RFAILED; @@ -1561,8 +1562,6 @@ S16 duBuildAndSendMacCellCfg() /* copy the mac config structure from duCfgParams */ memcpy(duMacCellCfg,&duCfgParam.macCellCfg,sizeof(MacCellCfg)); - duMacCellCfg->transId = getTransId(); /* transaction ID */ - /* Fill Pst */ pst.selector = ODU_SELECTOR_LWLC; pst.srcEnt = ENTDUAPP; @@ -1571,8 +1570,9 @@ S16 duBuildAndSendMacCellCfg() pst.srcInst = 0; pst.dstProcId = DU_PROC; pst.srcProcId = DU_PROC; - pst.region = duCb.init.region; - pst.event = EVENT_MAC_CELL_CONFIG_REQ; + pst.region = DU_APP_MEM_REGION; + pst.pool = DU_POOL; + pst.event = EVENT_MAC_CELL_CONFIG_REQ; /* Send MAC cell config to MAC */ return (*packMacCellCfgOpts[pst.selector])(&pst, duMacCellCfg); @@ -1595,38 +1595,32 @@ S16 duBuildAndSendMacCellCfg() ***************************************************************************/ int duHandleMacCellCfgCfm(Pst *pst, MacCellCfgCfm *macCellCfgCfm) { - S16 ret = ROK; + uint8_t actvCellIdx = 0; + S16 ret = ROK; if(macCellCfgCfm->rsp == ROK) + { + for(actvCellIdx = 0 ; actvCellIdx transId == duCb.duMacCellCfg->transId) - { - /* free the memory allocated during sending macCellCfg request */ - DU_FREE(duCb.duMacCellCfg->sib1Cfg.sib1Pdu, duCfgParam.srvdCellLst[0].duSysInfo.sib1Len); - DU_FREE(duCb.duMacCellCfg,sizeof(MacCellCfg)); - duCb.duMacCellCfg = NULLP; - - /* Build and send GNB-DU config update */ - ret = BuildAndSendDUConfigUpdate(); - - /* TODO: Trigger cell start req once cell up slot ind is received*/ - /* Build and Send Cell Start Req to MAC */ - ret = duBuildAndSendMacCellStartReq(); - - } - else - { - /* transaction ID missmatch */ - DU_LOG("\n transaction ID mismatch in macCellCfg"); - ret = RFAILED; - } - } - else - { - DU_LOG("\nMac cell cfg failed"); - ret = RFAILED; + if(macCellCfgCfm->cellId == duCb.actvCellLst[actvCellIdx]->cellId) + { + duCb.duMacCellCfg = NULLP; + /* Build and send GNB-DU config update */ + ret = BuildAndSendDUConfigUpdate(); + + /* TODO: Trigger cell start req once cell up slot ind is received*/ + /* Build and Send Cell Start Req to MAC */ + ret = duBuildAndSendMacCellStartReq(); + + } } - return ret; + } + else + { + DU_LOG("\nMac cell cfg failed"); + ret = RFAILED; + } + return ret; } /*******************************************************************