Code Review
/
o-du
/
l2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
L1-L2 Integration fixes.[Issue-ID: ODUHIGH-252]
[o-du/l2.git]
/
src
/
cu_stub
/
cu_f1ap_msg_hdl.c
diff --git
a/src/cu_stub/cu_f1ap_msg_hdl.c
b/src/cu_stub/cu_f1ap_msg_hdl.c
index
5b617b1
..
0cfc141
100644
(file)
--- a/
src/cu_stub/cu_f1ap_msg_hdl.c
+++ b/
src/cu_stub/cu_f1ap_msg_hdl.c
@@
-224,11
+224,7
@@
S16 SendF1APMsg(Region region, Pool pool)
S16 BuildNrCellId(BIT_STRING_t *nrcell)
{
S16 BuildNrCellId(BIT_STRING_t *nrcell)
{
- U8 tmp;
- for (tmp = 0 ; tmp < nrcell->size-1; tmp++)
- {
- nrcell->buf[tmp] = 0;
- }
+ memset(nrcell->buf, 0, nrcell->size);
nrcell->buf[4] = 16;
nrcell->bits_unused = 4;
nrcell->size = 5 * sizeof(uint8_t);
nrcell->buf[4] = 16;
nrcell->bits_unused = 4;
nrcell->size = 5 * sizeof(uint8_t);
@@
-255,8
+251,8
@@
S16 BuildNrCellId(BIT_STRING_t *nrcell)
* ****************************************************************/
S16 BuildAndSendF1SetupRsp()
{
* ****************************************************************/
S16 BuildAndSendF1SetupRsp()
{
-
U8
idx,ieIdx;
-
U8
elementCnt,cellCnt;
+
uint8_t
idx,ieIdx;
+
uint8_t
elementCnt,cellCnt;
F1AP_PDU_t *f1apMsg = NULL;
F1SetupResponse_t *f1SetupRsp;
GNB_CU_Name_t *cuName;
F1AP_PDU_t *f1apMsg = NULL;
F1SetupResponse_t *f1SetupRsp;
GNB_CU_Name_t *cuName;
@@
-482,7
+478,7
@@
S16 BuildAndSendF1SetupRsp()
rrcVer = &f1SetupRsp->protocolIEs.list.array[idx]->value.choice.RRC_Version;
rrcVer->latest_RRC_Version.size = RRC_SIZE;
rrcVer = &f1SetupRsp->protocolIEs.list.array[idx]->value.choice.RRC_Version;
rrcVer->latest_RRC_Version.size = RRC_SIZE;
- CU_ALLOC(rrcVer->latest_RRC_Version.buf, sizeof(
U8
));
+ CU_ALLOC(rrcVer->latest_RRC_Version.buf, sizeof(
uint8_t
));
if(rrcVer->latest_RRC_Version.buf == NULLP)
{
CU_FREE(cuName->buf, sizeof(cuName->size));
if(rrcVer->latest_RRC_Version.buf == NULLP)
{
CU_FREE(cuName->buf, sizeof(cuName->size));
@@
-504,7
+500,7
@@
S16 BuildAndSendF1SetupRsp()
CU_ALLOC(rrcVer->iE_Extensions,sizeof(ProtocolExtensionContainer_4624P81_t));
if(rrcVer->iE_Extensions == NULLP)
{
CU_ALLOC(rrcVer->iE_Extensions,sizeof(ProtocolExtensionContainer_4624P81_t));
if(rrcVer->iE_Extensions == NULLP)
{
- CU_FREE(rrcVer->latest_RRC_Version.buf, sizeof(
U8
));
+ CU_FREE(rrcVer->latest_RRC_Version.buf, sizeof(
uint8_t
));
CU_FREE(cuName->buf, sizeof(cuName->size));
for(ieIdx=0; ieIdx<elementCnt; ieIdx++)
{
CU_FREE(cuName->buf, sizeof(cuName->size));
for(ieIdx=0; ieIdx<elementCnt; ieIdx++)
{
@@
-525,7
+521,7
@@
S16 BuildAndSendF1SetupRsp()
{
CU_FREE(rrcVer->iE_Extensions,\
sizeof(ProtocolExtensionContainer_4624P81_t));
{
CU_FREE(rrcVer->iE_Extensions,\
sizeof(ProtocolExtensionContainer_4624P81_t));
- CU_FREE(rrcVer->latest_RRC_Version.buf, sizeof(
U8
));
+ CU_FREE(rrcVer->latest_RRC_Version.buf, sizeof(
uint8_t
));
CU_FREE(cuName->buf, sizeof(cuName->size));
for(ieIdx=0; ieIdx<elementCnt; ieIdx++)
{
CU_FREE(cuName->buf, sizeof(cuName->size));
for(ieIdx=0; ieIdx<elementCnt; ieIdx++)
{
@@
-546,7
+542,7
@@
S16 BuildAndSendF1SetupRsp()
sizeof(struct RRC_Version_ExtIEs *));
CU_FREE(rrcVer->iE_Extensions,\
sizeof(ProtocolExtensionContainer_4624P81_t));
sizeof(struct RRC_Version_ExtIEs *));
CU_FREE(rrcVer->iE_Extensions,\
sizeof(ProtocolExtensionContainer_4624P81_t));
- CU_FREE(rrcVer->latest_RRC_Version.buf, sizeof(
U8
));
+ CU_FREE(rrcVer->latest_RRC_Version.buf, sizeof(
uint8_t
));
CU_FREE(cuName->buf, sizeof(cuName->size));
for(ieIdx=0; ieIdx<elementCnt; ieIdx++)
{
CU_FREE(cuName->buf, sizeof(cuName->size));
for(ieIdx=0; ieIdx<elementCnt; ieIdx++)
{
@@
-565,10
+561,10
@@
S16 BuildAndSendF1SetupRsp()
rrcVer->iE_Extensions->list.array[0]->extensionValue.present = \
RRC_Version_ExtIEs__extensionValue_PR_Latest_RRC_Version_Enhanced;
rrcVer->iE_Extensions->list.array[0]->extensionValue.choice.\
rrcVer->iE_Extensions->list.array[0]->extensionValue.present = \
RRC_Version_ExtIEs__extensionValue_PR_Latest_RRC_Version_Enhanced;
rrcVer->iE_Extensions->list.array[0]->extensionValue.choice.\
- Latest_RRC_Version_Enhanced.size = 3*sizeof(
U8
);
+ Latest_RRC_Version_Enhanced.size = 3*sizeof(
uint8_t
);
CU_ALLOC(rrcVer->iE_Extensions->list.\
array[0]->extensionValue.choice.Latest_RRC_Version_Enhanced.buf,\
CU_ALLOC(rrcVer->iE_Extensions->list.\
array[0]->extensionValue.choice.Latest_RRC_Version_Enhanced.buf,\
- 3*sizeof(
U8
));
+ 3*sizeof(
uint8_t
));
if(rrcVer->iE_Extensions->list.\
array[0]->extensionValue.choice.Latest_RRC_Version_Enhanced.buf == NULLP)
{
if(rrcVer->iE_Extensions->list.\
array[0]->extensionValue.choice.Latest_RRC_Version_Enhanced.buf == NULLP)
{
@@
-578,7
+574,7
@@
S16 BuildAndSendF1SetupRsp()
sizeof(struct RRC_Version_ExtIEs *));
CU_FREE(rrcVer->iE_Extensions,\
sizeof(ProtocolExtensionContainer_4624P81_t));
sizeof(struct RRC_Version_ExtIEs *));
CU_FREE(rrcVer->iE_Extensions,\
sizeof(ProtocolExtensionContainer_4624P81_t));
- CU_FREE(rrcVer->latest_RRC_Version.buf, sizeof(
U8
));
+ CU_FREE(rrcVer->latest_RRC_Version.buf, sizeof(
uint8_t
));
CU_FREE(cuName->buf, sizeof(cuName->size));
for(ieIdx=0; ieIdx<elementCnt; ieIdx++)
{
CU_FREE(cuName->buf, sizeof(cuName->size));
for(ieIdx=0; ieIdx<elementCnt; ieIdx++)
{
@@
-606,7
+602,7
@@
S16 BuildAndSendF1SetupRsp()
encRetVal = aper_encode(&asn_DEF_F1AP_PDU, 0, f1apMsg, PrepFinalEncBuf, encBuf);
/* Clean up */
encRetVal = aper_encode(&asn_DEF_F1AP_PDU, 0, f1apMsg, PrepFinalEncBuf, encBuf);
/* Clean up */
- CU_FREE(rrcVer->latest_RRC_Version.buf, sizeof(
U8
));
+ CU_FREE(rrcVer->latest_RRC_Version.buf, sizeof(
uint8_t
));
CU_FREE(cuName->buf, sizeof(cuName->size));
for(idx=0; idx<elementCnt; idx++)
{
CU_FREE(cuName->buf, sizeof(cuName->size));
for(idx=0; idx<elementCnt; idx++)
{
@@
-663,8
+659,8
@@
S16 BuildAndSendF1SetupRsp()
S16 BuildAndSendDUUpdateAck()
{
S16 BuildAndSendDUUpdateAck()
{
-
U8
idx;
-
U8
elementCnt;
+
uint8_t
idx;
+
uint8_t
elementCnt;
F1AP_PDU_t *f1apMsg = NULL;
GNBDUConfigurationUpdateAcknowledge_t *gNBDuCfgAck;
asn_enc_rval_t enRetVal; /* Encoder return value */
F1AP_PDU_t *f1apMsg = NULL;
GNBDUConfigurationUpdateAcknowledge_t *gNBDuCfgAck;
asn_enc_rval_t enRetVal; /* Encoder return value */
@@
-1436,7
+1432,7
@@
uint8_t fillDlDcchRrcMsg(RRCContainer_t *rrcContainer)
{
/* encode DL-DCCH message into RRC Container */
xer_fprint(stdout, &asn_DEF_DL_DCCH_MessageType, &dl_DCCH_Msg);
{
/* encode DL-DCCH message into RRC Container */
xer_fprint(stdout, &asn_DEF_DL_DCCH_MessageType, &dl_DCCH_Msg);
-
cmMemset((U8 *)
encBuf, 0, ENC_BUF_MAX_LEN);
+
memset(
encBuf, 0, ENC_BUF_MAX_LEN);
encBufSize = 0;
encRetVal = aper_encode(&asn_DEF_DL_DCCH_MessageType, 0, &dl_DCCH_Msg, PrepFinalEncBuf, encBuf);
/* Encode results */
encBufSize = 0;
encRetVal = aper_encode(&asn_DEF_DL_DCCH_MessageType, 0, &dl_DCCH_Msg, PrepFinalEncBuf, encBuf);
/* Encode results */
@@
-1639,7
+1635,7
@@
uint8_t BuildAndSendDLRRCMessageTransfer(uint8_t rrcMsgType)
dlRRCMsg->protocolIEs.list.array[idx]->criticality = Criticality_reject;
dlRRCMsg->protocolIEs.list.array[idx]->value.present = \
DLRRCMessageTransferIEs__value_PR_SRBID;
dlRRCMsg->protocolIEs.list.array[idx]->criticality = Criticality_reject;
dlRRCMsg->protocolIEs.list.array[idx]->value.present = \
DLRRCMessageTransferIEs__value_PR_SRBID;
- dlRRCMsg->protocolIEs.list.array[idx]->value.choice.SRBID = SRB
1
;
+ dlRRCMsg->protocolIEs.list.array[idx]->value.choice.SRBID = SRB
0
;
/* RRCContainer */
idx++;
/* RRCContainer */
idx++;
@@
-1815,9
+1811,9
@@
uint8_t procInitULRRCMsg(F1AP_PDU_t *f1apMsg)
uint8_t BuildNrcgi(NRCGI_t *nrcgi)
{
uint8_t ret;
uint8_t BuildNrcgi(NRCGI_t *nrcgi)
{
uint8_t ret;
- uint8_t unused = 4;
+ uint8_t unused
_bits
= 4;
uint8_t byteSize = 5;
uint8_t byteSize = 5;
- uint8_t val = 1
6
;
+ uint8_t val = 1;
/* Allocate Buffer Memory */
nrcgi->pLMN_Identity.size = 3 * sizeof(uint8_t);
CU_ALLOC(nrcgi->pLMN_Identity.buf, nrcgi->pLMN_Identity.size);
/* Allocate Buffer Memory */
nrcgi->pLMN_Identity.size = 3 * sizeof(uint8_t);
CU_ALLOC(nrcgi->pLMN_Identity.buf, nrcgi->pLMN_Identity.size);
@@
-1837,11
+1833,17
@@
uint8_t BuildNrcgi(NRCGI_t *nrcgi)
{
return RFAILED;
}
{
return RFAILED;
}
+#if 0
ret = fillBitString(&nrcgi->nRCellIdentity, unused, byteSize, val);
if(ret != ROK)
{
return RFAILED;
}
ret = fillBitString(&nrcgi->nRCellIdentity, unused, byteSize, val);
if(ret != ROK)
{
return RFAILED;
}
+#endif
+ memset(nrcgi->nRCellIdentity.buf, 0, nrcgi->nRCellIdentity.size);
+ nrcgi->nRCellIdentity.buf[0] |= val;
+ nrcgi->nRCellIdentity.bits_unused = unused_bits;
+
return ROK;
}
/*******************************************************************
return ROK;
}
/*******************************************************************