nci = (U16)cell->cellInfo.nrEcgi.cellId;
duCb.cfgCellLst[nci-1] = cell;
+ duCb.numCfgCells++;
}
}
if(ret != RFAILED)
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;
/* 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;
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);
***************************************************************************/
int duHandleMacCellCfgCfm(Pst *pst, MacCellCfgCfm *macCellCfgCfm)
{
- S16 ret = ROK;
+ uint8_t actvCellIdx = 0;
+ S16 ret = ROK;
if(macCellCfgCfm->rsp == ROK)
+ {
+ for(actvCellIdx = 0 ; actvCellIdx <duCb.numActvCells ; actvCellIdx++)
{
- if(macCellCfgCfm->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;
}
/*******************************************************************