#include "common_def.h"
+#ifdef MEM_SIZE_CHECK
+#define CM_MEMORY_ALLOC_SIZE_LOG(_line, _func, _size) \
+{\
+ DU_LOG("\nRLC line = %d, func = %s, _size= %d ", _line, _func, _size); \
+}
+#else
+#define CM_MEMORY_ALLOC_SIZE_LOG(_line, _func, _size) {}
+#endif
+
/*Spec 38.104, Table 5.4.2.1-1 ARFCN - FREQ mapping*/
/*{ F_REF(Mhz), ΔF_Global, F_REF-Offs, N_REF-offs, Range of N_REF }*/
uint32_t arfcnFreqTable[3][5] = {
}
/*******************************************************************
- * @brief convert scs periodicity value into the enum value received from O1
+ * @brief convert SSB periodicity value into the enum value received from O1
*
* @details
*
- * Function : convertScsPeriodicityToEnum
+ * Function : convertSSBPeriodicityToEnum
*
* Functionality:
* - convert scs periodicity value
* RFAILED - failure
*
* ****************************************************************/
-uint8_t convertScsPeriodicityToEnum(uint32_t num)
+uint8_t convertSSBPeriodicityToEnum(uint32_t num)
{
switch(num)
{
case 5:
- return SCS_5MS;
+ return SSB_5MS;
case 10:
- return SCS_10MS;
+ return SSB_10MS;
case 20:
- return SCS_20MS;
+ return SSB_20MS;
case 40:
- return SCS_40MS;
+ return SSB_40MS;
case 80:
- return SCS_80MS;
+ return SSB_80MS;
case 160:
- return SCS_160MS;
+ return SSB_160MS;
default:
- return SCS_5MS;
+ return SSB_5MS;
}
}
/*******************************************************************
* ****************************************************************/
uint8_t SGetSBufNewForDebug(char *file, const char *func, int line, Region region, Pool pool, Data **ptr, Size size)
{
+ CM_MEMORY_ALLOC_SIZE_LOG(line, func, size);
if(SGetSBuf(region, pool, ptr, size) == ROK)
{
#ifdef ODU_MEMORY_DEBUG_LOG
uint8_t SGetStaticBufNewForDebug(char *file, const char *func, int line, \
Region region, Pool pool, Data **ptr, Size size, uint8_t memType)
{
+ CM_MEMORY_ALLOC_SIZE_LOG(line, func, size);
if(SGetStaticBuffer(region, pool, ptr, size, memType) == ROK)
{
#ifdef ODU_MEMORY_DEBUG_LOG
for(indexTable = 0; indexTable < 3; indexTable++)
{
- if(freq < arfcnFreqTable[indexTable][0])
+ if(freq < (arfcnFreqTable[indexTable][0] * 1000))
{
arfcn = arfcnFreqTable[indexTable][3] + ((freq - (arfcnFreqTable[indexTable][2] * 1000)) / (arfcnFreqTable[indexTable][1]));
return (arfcn);