/******************************************************************************
-###############################################################################
-# Copyright (c) [2017-2020] [ICT/CAS] #
-# Licensed under the ORAN Software License v1.0 (License) #
-###############################################################################
-******************************************************************************/
+*
+* Copyright (c) 2020 ICT/CAS.
+*
+* Licensed under the O-RAN Software License, Version 1.0 (the "Software License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* https://www.o-ran.org/software
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+*******************************************************************************/
+
#include "vos_types.h"
#include "vos_string.h"
#include "vos_linklist.h"
/* not used at the moment */
/*void pdcpuSetLessCountFun(const void* cpv_first, const void* cpv_second, void* pv_output)
-{
+{
assert(cpv_first != NULL && cpv_second != NULL && pv_output != NULL);
-
+
*(bool_t*)pv_output = (((PdcpuDataBuffNode_t *)cpv_first)->count) < (((PdcpuDataBuffNode_t *)cpv_second)->count) ? true : false;
}*/
}
VOS_Free(p);
p = NULL;
-
+
return ;
}
/*******************************************************************************
- * discard all stored PDCP PDUs in the transmitting buffer
+ * discard all stored PDCP PDUs in the transmitting buffer
* INPUT:
* pTxPduList: transmitting buffer list
* OUTPUT:
}
/*******************************************************************************
- * transmit or retransmit all stored PDCP PDUs in the transmitting buffer
+ * transmit or retransmit all stored PDCP PDUs in the transmitting buffer
* INPUT:
* pTxPduList: transmitting buffer list
* OUTPUT:
}
/*******************************************************************************
- * deliver the PDCP SDUs stored in the receiving buffer to upper layers
- * in ascending order of associated COUNT values
+ * deliver the PDCP SDUs stored in the receiving buffer to upper layers
+ * in ascending order of associated COUNT values
* INPUT:
* pTxPduList: transmitting buffer list
* OUTPUT:
/*******************************************************************************
- * To construct and send a PDCP status report
+ * To construct and send a PDCP status report
* INPUT:
* pPdcpuEntity: pdcpu entity
* OUTPUT:
}
/*******************************************************************************
- * To perform PDCP data recovery
+ * To perform PDCP data recovery
* INPUT:
* ueE1apId: UE E1AP ID
* drbId : DRB ID
if(PDCP_SN_SIZE_S12 == snCfg)
{
*pSn = LEN12BITS;
-
+
}else if(PDCP_SN_SIZE_S18 == snCfg)
{
*pSn = LEN18BITS;
-
+
}else
{
pdcpuLog(LOG_ERR,"[PDCPU] input sn size is wrong!\n");
return VOS_ERROR;
}
-
+
return VOS_OK;
}
case RLCMODE_TM:
pdcpuLog(LOG_ERR,"[PDCPU] input-TM MODE is wrong!\n");
return VOS_ERROR;
-
+
case RLCMODE_AM:
*pRlcMode = AM_MODE;
return VOS_OK;
}
/*******************************************************************************
- * To get SDAP DATA PDU header length configuration
+ * To get SDAP DATA PDU header length configuration
* INPUT:
- * sdapHeadInd :
- * sdapHeadLen :
+ * sdapHeadInd :
+ * sdapHeadLen :
* OUTPUT:
* none
*******************************************************************************/
if(SDAP_HEADER_PRESENT == sdapHeadInd)
{
*sdapHeadLen = 1; /*Data PDU with SDAP header*/
-
+
}else if(SDAP_HEADER_ABSENT == sdapHeadInd)
{
*sdapHeadLen = 0; /*Data PDU without SDAP header*/
-
+
}else
- {
+ {
pdcpuLog(LOG_ERR,"[PDCPU] sdap head cfg is wrong\n");
return VOS_ERROR;
}
-
+
return VOS_OK;
}
/*******************************************************************************
- * To create PDCP-U entity
+ * To create PDCP-U entity
* INPUT:
* ueE1apId: UE E1AP ID
* pDrbItem : DRB to setup item
* -1:failed
*******************************************************************************/
INT32 pdcpuCreateEntity(UINT64 ueE1apId, UINT16 ueIdx, UINT16 pduSessionId, upcTempDrbInfo_t *pDrbItem)
-{
- UINT8 drbId = pDrbItem->drbId;
+{
+ UINT8 drbId = pDrbItem->drbId;
PdcpuUeInfo_t *pPdcpUeInfo = NULL;
PdcpDrbEntity_t *pPdcpuEntity = NULL;
INT8 ret = 0;
pdcpuCheckUeIdx(ueIdx);
pdcpuCheckDrbId(drbId);
-
- /* examine ue info */
+
+ /* examine ue info */
if(NULL == gPdcpuUeInfo[ueIdx])
{
pPdcpUeInfo = VOS_Malloc(sizeof(PdcpuUeInfo_t), gPdcpuModuleId);
pdcpuNullCheck(pPdcpUeInfo);
VOS_MemZero(pPdcpUeInfo, sizeof(PdcpuUeInfo_t));
- gPdcpuUeInfo[ueIdx] = pPdcpUeInfo;
+ gPdcpuUeInfo[ueIdx] = pPdcpUeInfo;
}else
{
pPdcpUeInfo = gPdcpuUeInfo[ueIdx];
}
-
+
/* examine drb info */
if(NULL != pPdcpUeInfo->pdcpDrbEntity[drbId])
{
pPdcpuEntity = pPdcpUeInfo->pdcpDrbEntity[drbId];
- }
- pPdcpuEntity = VOS_Malloc(sizeof(PdcpDrbEntity_t), gPdcpuModuleId);
+ }
+ pPdcpuEntity = VOS_Malloc(sizeof(PdcpDrbEntity_t), gPdcpuModuleId);
pdcpuNullCheck(pPdcpuEntity);
VOS_MemZero(pPdcpuEntity, sizeof(PdcpDrbEntity_t));
pPdcpUeInfo->pdcpDrbEntity[drbId] = pPdcpuEntity;
-
+
PDCPConfiguration_t *pPdcpCfg = &(pDrbItem->pdcpConfig);
pPdcpuEntity->ueE1apId = ueE1apId;
pPdcpuEntity->ueIdx = ueIdx;
pdcpuLog(LOG_ERR,"[PDCPU] input parameter is wrong\n");
VOS_Free(pPdcpuEntity);
pPdcpUeInfo->pdcpDrbEntity[drbId] = NULL;
- return VOS_ERROR;
+ return VOS_ERROR;
}
-
+
/* set security enable information */
PdcpuSecEnableInfo_t *pEnableInfo = gPdcpuUeInfo[ueIdx]->secEnableInfo[pduSessionId];
- pdcpuNullCheck(pEnableInfo);
+ pdcpuNullCheck(pEnableInfo);
pPdcpuEntity->integrityProtection = pEnableInfo->integrityEnableFlag;
pPdcpuEntity->ciperingEnabled = pEnableInfo->cipherEnableFlag;
return VOS_OK;
}
-