[Epic-ID: ODUHIGH-538][Issue-ID: ODUHIGH-575] Deallocating the variables allocated...
[o-du/l2.git] / src / 5gnrmac / lwr_mac_fsm.c
index 6b84d58..be9a690 100644 (file)
@@ -51,7 +51,7 @@
 /* Global variables */
 LwrMacCb lwrMacCb;
 
-uint8_t UnrestrictedSetNcsTable[MAX_ZERO_CORR_CFG_IDX];
+extern uint8_t UnrestrictedSetNcsTable[MAX_ZERO_CORR_CFG_IDX];
 void fapiMacConfigRsp(uint16_t cellId);
 uint16_t sendTxDataReq(SlotTimingInfo currTimingInfo, MacDlSlot *dlSlot, p_fapi_api_queue_elem_t prevElem, fapi_vendor_tx_data_req_t *vendorTxDataReq);
 uint16_t fillUlTtiReq(SlotTimingInfo currTimingInfo, p_fapi_api_queue_elem_t prevElem, fapi_vendor_ul_tti_req_t* vendorUlTti);
@@ -3807,7 +3807,7 @@ uint16_t fillDlTtiReq(SlotTimingInfo currTimingInfo)
    {
           GET_CELL_IDX(currTimingInfo.cellId, cellIdx);
           /* consider phy delay */
-          ADD_DELTA_TO_TIME(currTimingInfo,dlTtiReqTimingInfo,PHY_DELTA_DL, macCb.macCell[cellIdx]->numOfSlots);
+          ADD_DELTA_TO_TIME(currTimingInfo,dlTtiReqTimingInfo,gConfigInfo.gPhyDeltaDl, macCb.macCell[cellIdx]->numOfSlots);
           dlTtiReqTimingInfo.cellId = currTimingInfo.cellId;
 
           macCellCfg = macCb.macCell[cellIdx]->macCellCfg;
@@ -4515,7 +4515,7 @@ uint16_t fillUlTtiReq(SlotTimingInfo currTimingInfo, p_fapi_api_queue_elem_t pre
       macCellCfg = macCb.macCell[cellIdx]->macCellCfg;
 
       /* add PHY delta */
-      ADD_DELTA_TO_TIME(currTimingInfo,ulTtiReqTimingInfo,PHY_DELTA_UL, macCb.macCell[cellIdx]->numOfSlots);
+      ADD_DELTA_TO_TIME(currTimingInfo,ulTtiReqTimingInfo,gConfigInfo.gPhyDeltaUl, macCb.macCell[cellIdx]->numOfSlots);
       currUlSlot = &macCb.macCell[cellIdx]->ulSlot[ulTtiReqTimingInfo.slot % macCb.macCell[cellIdx]->numOfSlots];
 
       LWR_MAC_ALLOC(ulTtiElem, (sizeof(fapi_api_queue_elem_t) + sizeof(fapi_ul_tti_req_t)));
@@ -4534,6 +4534,9 @@ uint16_t fillUlTtiReq(SlotTimingInfo currTimingInfo, p_fapi_api_queue_elem_t pre
          ulTtiReq->nGroup = 0;
          if(ulTtiReq->nPdus > 0)
          {
+#ifdef ODU_SLOT_IND_DEBUG_LOG
+               DU_LOG("\nDEBUG --> LWR_MAC: UL_TTI_REQ, datatype:%d, sfn/slot:%d/%d", currUlSlot->ulSchInfo.dataType,  ulTtiReq->sfn,  ulTtiReq->slot);
+#endif
             /* Fill Prach Pdu */
             if(currUlSlot->ulSchInfo.dataType & SCH_DATATYPE_PRACH)
             {
@@ -4548,6 +4551,9 @@ uint16_t fillUlTtiReq(SlotTimingInfo currTimingInfo, p_fapi_api_queue_elem_t pre
                {
                   if(currUlSlot->ulSchInfo.schPuschInfo[ueIdx].crnti != 0)
                   {
+#ifdef ODU_SLOT_IND_DEBUG_LOG
+               DU_LOG("\nDEBUG --> LWR_MAC: UL_TTI_REQ, PUSCH PDU ueId:%d", ueIdx);
+#endif
                      pduIdx++;
                      fillPuschPdu(&ulTtiReq->pdus[pduIdx], &vendorUlTti->ul_pdus[pduIdx], &macCellCfg, &currUlSlot->ulSchInfo.schPuschInfo[ueIdx]);
                      ulTtiReq->nUlsch++;