Memory handling fixes [Issue-ID: ODUHIGH-337]
[o-du/l2.git] / src / 5gnrmac / mac.h
index 6c27527..e64cba2 100644 (file)
@@ -23,8 +23,9 @@
 #define MAX_CRI_SIZE 6
 #define MAX_MAC_DL_PDU 16
 #define MAX_NUM_HARQ_PROC  16
-#define MAX_SLOT_SUPPORTED    10 /* numerology 0 15Khz */
 #define MAX_ZERO_CORR_CFG_IDX 16 /* max zero correlation config index */
+#define MAC_TQ_SIZE    10        /* Timing Queue Size */
+#define MAX_NUM_TIMER  1         /* MAX number of MAC timers */
 
 #define DEFAULT_CELLS 1
 #define SI_RNTI 0xFFFF
@@ -180,8 +181,8 @@ struct macCellCb
    uint16_t    cellId;
    uint8_t     crntiMap;
    MacRaCbInfo macRaCb[MAX_NUM_UE];
-   MacDlSlot   dlSlot[MAX_SLOT_SUPPORTED];
-   MacUlSlot   ulSlot[MAX_SLOT_SUPPORTED];
+   MacDlSlot   dlSlot[MAX_SLOTS];
+   MacUlSlot   ulSlot[MAX_SLOTS];
    uint16_t    numActvUe;
    MacUeCfg    *ueCfgTmpData[MAX_NUM_UE];
    MacUeCb     ueCb[MAX_NUM_UE];
@@ -193,6 +194,10 @@ typedef struct macCb
 {
    Inst       macInst;
    ProcId     procId;
+   uint8_t    tmrRes;                    /*!< Timer resolution */
+   CmTqCp     tmrTqCp;                   /*!< Timer Task Queue Cntrl Point */
+   CmTqType   tmrTq[MAC_TQ_SIZE];        /*!< Timer Task Queue */
+   CmTimer    tmrBlk[MAX_NUM_TIMER];     /*!< Timer Block */
    MacCellCb  *macCell[MAX_NUM_CELL];
 }MacCb;
 
@@ -200,6 +205,7 @@ typedef struct macCb
 MacCb macCb;
 
 /* Function declarations */
+short int macActvTmr(Ent ent,Inst inst);
 void fillRarPdu(RarInfo *rarInfo);
 void createMacRaCb(RachIndInfo *rachIndInfo);
 void fillMsg4DlData(MacDlData *dlData, uint16_t msg4PduLen, uint8_t *msg4Pdu);