return ROK;
}
+/*******************************************************************
+ *
+ * @brief Builds NRCell ID
+ *
+ * @details
+ *
+ * Function : BuildNrCellId
+ *
+ * Functionality: Building the NR Cell ID
+ *
+ * @params[in] BIT_STRING_t *nrcell
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+
+S16 BuildNrCellId(BIT_STRING_t *nrcell)
+{
+ memset(nrcell->buf, 0, nrcell->size);
+ nrcell->buf[4] = 16;
+ nrcell->bits_unused = 4;
+ return ROK;
+}
+
/*******************************************************************
*
* @brief Builds Nrcgi
uint8_t BuildNrcgi(NRCGI_t *nrcgi)
{
uint8_t ret;
- uint8_t unused = 4;
uint8_t byteSize = 5;
- uint8_t val = 16;
/* Allocate Buffer Memory */
nrcgi->pLMN_Identity.size = PLMN_SIZE * sizeof(uint8_t);
DU_ALLOC(nrcgi->pLMN_Identity.buf, nrcgi->pLMN_Identity.size);
return RFAILED;
}
/*nrCellIdentity*/
- //ret = BuildNrCellId(&nrcgi->nRCellIdentity);
nrcgi->nRCellIdentity.size = byteSize * sizeof(uint8_t);
DU_ALLOC(nrcgi->nRCellIdentity.buf, nrcgi->nRCellIdentity.size);
if(nrcgi->nRCellIdentity.buf == NULLP)
{
return RFAILED;
}
- ret = fillBitString(&nrcgi->nRCellIdentity, unused, byteSize, val);
- if(ret != ROK)
- {
- return RFAILED;
- }
+ BuildNrCellId(&nrcgi->nRCellIdentity);
+
return ROK;
}
/*******************************************************************
DU_FREE(ueCfg->cellGrpCfg, sizeof(CellGroupConfigRrc_t));
ueCfg->cellGrpCfg = NULLP;
}
- if(ueCfg->maxAggrBitRate)
+ if(ueCfg->ambrCfg)
{
- DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, ueCfg->maxAggrBitRate, sizeof(MaxAggrBitRate));
+ memset(ueCfg->ambrCfg, 0, sizeof(AmbrCfg));
+ DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, ueCfg->ambrCfg, sizeof(AmbrCfg));
}
for(lcIdx = 0; lcIdx < ueCfg->numRlcLcs; lcIdx++)
{
}
freeDuUeCfg(&f1UeDb->duUeCfg);
memset(f1UeDb, 0, sizeof(F1UeContextSetupDb));
+ DU_FREE(f1UeDb, sizeof(F1UeContextSetupDb));
}
/*******************************************************************
{
macPdschCfg->timeDomRsrcAllociList[timeDomIdx].mappingType = \
timeDomAlloc->choice.setup->list.array[timeDomIdx]->mappingType;
- //macPdschCfg->timeDomRsrcAllociList[timeDomIdx].startSymbol = \
-
- //macPdschCfg->timeDomRsrcAllociList[timeDomIdx].symbolLength;
macPdschCfg->timeDomRsrcAllociList[timeDomIdx].startSymbolAndLength = \
timeDomAlloc->choice.setup->list.array[timeDomIdx]->startSymbolAndLength;
}
macPuschCfg->timeDomRsrcAllocList[timeDomIdx].k2 = \
*(timeDomAllocList->choice.setup->list.array[timeDomIdx]->k2);
macPuschCfg->timeDomRsrcAllocList[timeDomIdx].mappingType = \
- timeDomAllocList->choice.setup->list.array[timeDomIdx]->mappingType;
+ timeDomAllocList->choice.setup->list.array[timeDomIdx]->mappingType;
macPuschCfg->timeDomRsrcAllocList[timeDomIdx].startSymbolAndLength = \
timeDomAllocList->choice.setup->list.array[timeDomIdx]->startSymbolAndLength;
- //macPuschCfg->timeDomRsrcAllocList[timeDomIdx].startSymbol = \
- timeDomAllocList->choice.setup->list.array[timeDomIdx]->startSymbol;
- //macPuschCfg->timeDomRsrcAllocList[timeDomIdx].symbolLen = \
- timeDomAllocList->choice.setup->list.array[timeDomIdx]->symbolLen;
}
}
}
{
uint8_t ret, ieIdx, ueIdx, lcId, cellIdx;
bool ueCbFound = false;
- uint32_t gnbCuUeF1apId, gnbDuUeF1apId;
+ uint32_t gnbCuUeF1apId, gnbDuUeF1apId, bitRateSize;
DuUeCb *duUeCb = NULLP;
UEContextSetupRequest_t *ueSetReq = NULLP;
}
case ProtocolIE_ID_id_RRCDeliveryStatusRequest:
{
- duUeCb->f1UeDb->dlRrcMsg->deliveryStatRpt = true;
+ if(duUeCb->f1UeDb->dlRrcMsg->rrcMsgPdu)
+ {
+ duUeCb->f1UeDb->dlRrcMsg->deliveryStatRpt = true;
+ }
+ else
+ {
+ DU_LOG("\nIgnoring delivery report, since rrcContainer is not present");
+ }
break;
}
- //TODO: To handle maxAggrBitRate case,
- // Dependency: The protocolIE is not specified in ASN
-#if 0
- case ProtocolIE_ID_id_ULPDUSessionAggregateMaximumBitRate: {
+ case ProtocolIE_ID_id_GNB_DU_UE_AMBR_UL: {
/* MaximumBitRate Uplink */
bitRateSize = ueSetReq->protocolIEs.list.array[ieIdx]->value.choice.BitRate.size;
if(bitRateSize > 0)
{
- DU_ALLOC_SHRABL_BUF(duUeCb->f1UeDb->duUeCfg.maxAggrBitRate, bitRateSize);
- if(!duUeCb->f1UeDb->duUeCfg.maxAggrBitRate)
+ DU_ALLOC_SHRABL_BUF(duUeCb->f1UeDb->duUeCfg.ambrCfg, bitRateSize);
+ if(!duUeCb->f1UeDb->duUeCfg.ambrCfg)
{
DU_LOG("\nDU APP : Memory allocation failed for bitRate in procUeCtxtSetupReq");
ret = RFAILED;
}
else
{
- duUeCb->f1UeDb->duUeCfg.maxAggrBitRate->ulBits =\
- *ueSetReq->protocolIEs.list.array[ieIdx]->value.choice.BitRate.buf;
- duUeCb->f1UeDb->duUeCfg.maxAggrBitRate->dlBits = 0;
+ memset(duUeCb->f1UeDb->duUeCfg.ambrCfg, 0, sizeof(AmbrCfg));
+ memcpy(&duUeCb->f1UeDb->duUeCfg.ambrCfg->ulBr,
+ ueSetReq->protocolIEs.list.array[ieIdx]->value.choice.BitRate.buf, bitRateSize);
+ duUeCb->f1UeDb->duUeCfg.ambrCfg->dlBr = 0;
}
}
else
ret = RFAILED;
break;
}
-#endif
default:
{
break;
choice.DUtoCURRCInformation.cellGroupConfig, cellGrpCfg);
/* Free UeContext Db created during Ue context Req */
freeF1UeDb(ueCb->f1UeDb);
+ ueCb->f1UeDb = NULLP;
}
}
else
cell = cellsToActivate.list.array[idx]->value.choice.Cells_to_be_Activated_List_Item;
bitStringToInt(&cell.nRCGI.nRCellIdentity, &nci);
- if(nci <= 0 || nci > MAX_NUM_CELL)
- {
- DU_LOG("\nDU APP : Invalid NCI %d", nci);
- return RFAILED;
- }
if(cell.nRPCI)
{
pci = *cell.nRPCI;
}
- ret = duProcCellsToBeActivated(nci, pci);
+ ret = duProcCellsToBeActivated(cell.nRCGI.pLMN_Identity.buf, nci, pci);
}
return ret;
}