Merge "Implementation of UE context release command JIRA ID = ODUHIGH-330"
[o-du/l2.git] / src / 5gnrmac / mac_utils.h
index 6a7c53a..185cce7 100644 (file)
@@ -30,7 +30,7 @@
         (Data **)&_datPtr, _size);                          \
    if(_ret == ROK)                                           \
    {                                                         \
-      cmMemset((uint8_t *)_datPtr, 0, _size);                \
+      memset(_datPtr, 0, _size);                \
    }                                                         \
    else                                                      \
    {                                                         \
@@ -45,6 +45,7 @@
    {                                                         \
       SPutSBuf(MAC_MEM_REGION, MAC_POOL,                     \
            (Data *)_datPtr, _size);                         \
+      _datPtr = NULLP;                                      \
    }                                                         \
 }
 
@@ -55,7 +56,7 @@
    if(SGetStaticBuffer(MAC_MEM_REGION, MAC_POOL,             \
            (Data **)&_buf, (Size) _size, 0) == ROK)         \
    {                                                         \
-      cmMemset((uint8_t *)(_buf), 0, _size);                 \
+      memset((_buf), 0, _size);                 \
    }                                                         \
    else                                                      \
    {                                                         \
@@ -78,7 +79,7 @@
 #define FILL_PST_MAC_TO_DUAPP(_pst, _event)                     \
 {                                                           \
    _pst.selector  = ODU_SELECTOR_LWLC;                      \
-   _pst.srcEnt    = ENTRG;                                  \
+   _pst.srcEnt    = ENTMAC;                                  \
    _pst.dstEnt    = ENTDUAPP;                               \
    _pst.dstInst   = 0;                                      \
    _pst.srcInst   = macCb.macInst;                          \
@@ -96,8 +97,8 @@
 #define FILL_PST_MAC_TO_SCH(_pst, _event)                       \
 {                                                           \
    _pst.selector  = ODU_SELECTOR_TC;                        \
-   _pst.srcEnt    = ENTRG;                                  \
-   _pst.dstEnt    = ENTRG;                                  \
+   _pst.srcEnt    = ENTMAC;                                  \
+   _pst.dstEnt    = ENTMAC;                                  \
    _pst.dstInst   = 1;                                      \
    _pst.srcInst   = macCb.macInst;                          \
    _pst.dstProcId = macCb.procId;                           \
 #define FILL_PST_MAC_TO_RLC(_pst, _dstInst, _event)        \
 {                                                      \
    pst.selector  = ODU_SELECTOR_LWLC;                  \
-   pst.srcEnt    = ENTRG;                              \
-   pst.dstEnt    = ENTKW;                              \
+   pst.srcEnt    = ENTMAC;                              \
+   pst.dstEnt    = ENTRLC;                              \
    pst.dstInst   = _dstInst;                           \
    pst.srcInst   = macCb.macInst;                      \
    pst.dstProcId = macCb.procId;                       \
    pst.intfVer   = 0;                                  \
 }
 
+/* Function declaration */
+uint16_t getNewCrnti(uint8_t *crntiMap);
+uint32_t shortBsrBytesTable[MAX_SHORT_BSR_TABLE_ENTRIES];
 /**********************************************************************
          End of file
 **********************************************************************/