Replaced old SSI function with new macros jira id - ODUHIGH-212
[o-du/l2.git] / src / 5gnrmac / mac_slot_ind.c
index 103623a..6b70ebb 100644 (file)
@@ -19,6 +19,8 @@
 #include "common_def.h"
 #include "lrg.h"
 #include "lrg.x"
+#include "rgu.h"
+#include "rgu.x"
 #include "du_app_mac_inf.h"
 #include "mac_sch_interface.h"
 #include "lwr_mac_upr_inf.h"
 /* Function declarations */
 extern uint16_t fillUlTtiReq(SlotIndInfo currTimingInfo);
 extern uint16_t fillDlTtiReq(SlotIndInfo currTimingInfo);
+extern uint16_t fillUlDciReq(SlotIndInfo currTimingInfo);
 
 /* function pointers for packing slot ind from mac to sch */
 MacSchSlotIndFunc macSchSlotIndOpts[] =
 {
    packMacSchSlotInd,
-   macSchSlotInd,
+   MacSchSlotInd,
    packMacSchSlotInd
 };
 
@@ -89,6 +92,12 @@ uint8_t MacProcDlAlloc(Pst *pst, DlSchedInfo *dlSchedInfo)
         msg4Alloc = dlSchedInfo->msg4Alloc;
         macCb.macCell[cellIdx]->macRaCb[0].msg4TbSize = msg4Alloc->msg4PdschCfg.codeword[0].tbSize;
       }
+      if(dlSchedInfo->ulGrant != NULLP)
+      {
+        currDlSlot = &macCb.macCell[cellIdx]->\
+           dlSlot[dlSchedInfo->schSlotValue.ulDciTime.slot];
+         currDlSlot->dlInfo.ulGrant = dlSchedInfo->ulGrant;
+      }
    }
    return ROK;
 }
@@ -300,6 +309,9 @@ uint8_t macProcSlotInd(SlotIndInfo slotInd)
 
    /* Trigger for UL TTI REQ */
    fillUlTtiReq(slotInd);
+   
+   /* Trigger for UL DCI REQ */
+   fillUlDciReq(slotInd);
 
    return ROK;
 }  /* macProcSlotInd */
@@ -328,7 +340,7 @@ uint8_t fapiMacSlotInd(Pst *pst, SlotIndInfo *slotInd)
    DU_LOG("\nMAC : Slot Indication received");
 
    /*starting Task*/
-   SStartTask(&startTime, PID_MAC_TTI_IND);
+   ODU_START_TASK(&startTime, PID_MAC_TTI_IND);
 
    /* send slot indication to scheduler */
    ret = sendSlotIndMacToSch(slotInd);
@@ -354,7 +366,7 @@ uint8_t fapiMacSlotInd(Pst *pst, SlotIndInfo *slotInd)
    }
 
    /*stoping Task*/
-   SStopTask(startTime, PID_MAC_TTI_IND);
+   ODU_STOP_TASK(startTime, PID_MAC_TTI_IND);
 
    return ret;
 }  /* fapiMacSlotInd */