X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2F5gnrmac%2Fmac.h;h=534b80eb23c9f6fe24cd2040cde06caf8fcf25a0;hb=d677deafcfd8b9984be18a25398502a84684d44c;hp=9ee975f8d94f1b915587b59a5deafacacc7b826a;hpb=fe5d6711157dc1d3308a9754893b58b3872cd81a;p=o-du%2Fl2.git diff --git a/src/5gnrmac/mac.h b/src/5gnrmac/mac.h index 9ee975f8d..534b80eb2 100644 --- a/src/5gnrmac/mac.h +++ b/src/5gnrmac/mac.h @@ -90,9 +90,25 @@ typedef enum MAC_LC_STATE_ACTIVE }MacLcState; +typedef struct dlTbInfo +{ + SlotTimingInfo txTime; + uint16_t tbSize; + uint8_t *tb; +}DlTbInfo; + +/* DL HARQ Process Info */ +typedef struct dlHarqProcCb +{ + uint8_t procId; /* HARQ Process Id */ + uint8_t numTb; /* Number of TB */ + DlTbInfo tbInfo[MAX_NUM_TB_PER_UE]; /* TB information */ +}DlHarqProcCb; + typedef struct macDlSlot { DlSchedInfo dlInfo; + DlPageAlloc *pageAllocInfo; }MacDlSlot; typedef struct macUlSlot @@ -107,8 +123,7 @@ typedef struct macCbInfo uint8_t msg3Pdu[6]; /* used as CRI value during muxing */ uint8_t *msg4Pdu; /* storing DL-CCCH Ind Pdu */ uint16_t msg4PduLen; /* storing DL-CCCH Ind Pdu Len */ - uint8_t *msg4TxPdu; /* muxed Pdu used for re-transmission */ - uint16_t msg4TbSize; /* size required for msg4TxPdu */ + DlHarqProcCb msg4HqInfo; /* HARQ process info for msg 4 */ }MacRaCbInfo; typedef struct macCe @@ -137,12 +152,6 @@ typedef struct macDlData MacDlInfo pduInfo[MAX_MAC_DL_PDU]; }MacDlData; -/* HARQ Process Info */ -typedef struct dlHarqProcCb -{ - uint8_t procId; /* HARQ Process Id */ -}DlHarqProcCb; - /* DL HARQ entity */ typedef struct dlHarqEnt { @@ -205,29 +214,29 @@ typedef struct ueDlCb /* UE Cb */ typedef struct macUeCb { - uint16_t ueId; /* UE Id calculated from CRNTI */ - uint8_t duUeF1apId; /* UE ID assigned by DU APP */ - uint16_t crnti; /* UE CRNTI */ - MacCellCb *cellCb; /* Pointer to cellCb to whihc this UE belongs */ - UeState state; /* Is UE active ? */ - MacRaCbInfo *raCb; /* RA info */ - MacBsrTmrCfg bsrTmrCfg; /* BSR Timer Info */ - UeUlCb ulInfo; /* UE specific UL info */ - UeDlCb dlInfo; /* UE specific DL info */ + uint16_t ueId; /* UE Id from DU APP */ + uint16_t crnti; /* UE CRNTI */ + MacCellCb *cellCb; /* Pointer to cellCb to whihc this UE belongs */ + UeState state; /* Is UE active ? */ + MacCfraResource cfraResource; /* CF-RA resource */ + MacRaCbInfo *raCb; /* RA info */ + MacBsrTmrCfg bsrTmrCfg; /* BSR Timer Info */ + UeUlCb ulInfo; /* UE specific UL info */ + UeDlCb dlInfo; /* UE specific DL info */ DataTransmissionAction transmissionAction; }MacUeCb; struct macCellCb { uint16_t cellId; + uint16_t numOfSlots; CellState state; - uint8_t crntiMap; + uint16_t crntiMap; MacRaCbInfo macRaCb[MAX_NUM_UE]; MacDlSlot dlSlot[MAX_SLOTS]; MacUlSlot ulSlot[MAX_SLOTS]; uint16_t numActvUe; MacUeCfg *ueCfgTmpData[MAX_NUM_UE]; - MacUeCb hoUeCb[MAX_NUM_UE]; MacUeCb ueCb[MAX_NUM_UE]; MacCellCfg macCellCfg; SlotTimingInfo currTime; @@ -250,7 +259,6 @@ 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); void fillMacCe(MacCeInfo *macCeData, uint8_t *msg3Pdu); void macMuxPdu(MacDlData *dlData, MacCeInfo *macCeData, uint8_t *msg4TxPdu, uint16_t tbSize);