Merge "Revert "[Epic-ID: ODUHIGH-462][Task-ID: ODUHIGH-472] Implementation of drx...
[o-du/l2.git] / src / 5gnrsch / sch_ue_mgr.c
index 8ca3bac..91b89b1 100644 (file)
@@ -1069,12 +1069,38 @@ void deleteSchPdschServCellCfg(SchPdschServCellCfg *pdschServCellCfg)
 * ****************************************************************/
 void deleteSchUeCb(SchUeCb *ueCb) 
 {
-   uint8_t timeDomRsrcIdx = 0, ueLcIdx = 0;
+   uint8_t timeDomRsrcIdx = 0, ueLcIdx = 0, idx =0;
    SchPucchCfg *pucchCfg = NULLP;
    SchPdschConfig *pdschCfg = NULLP;
 
    if(ueCb)
    {
+      if(ueCb->hqDlmap)
+      {
+         for (idx = 0; idx<ueCb->cellCb->numSlots; idx++)
+         {
+            if(ueCb->hqDlmap[idx])
+            {
+               cmLListDeleteLList(&ueCb->hqDlmap[idx]->hqList);
+               SCH_FREE(ueCb->hqDlmap[idx], sizeof(SchHqDlMap));
+            }
+         }
+         SCH_FREE(ueCb->hqDlmap, sizeof(SchHqDlMap*)*(ueCb->cellCb->numSlots));
+      }
+
+      if(ueCb->hqUlmap)
+      {
+         for (idx = 0; idx<ueCb->cellCb->numSlots; idx++)
+         {
+            if(ueCb->hqUlmap[idx])
+            {
+               cmLListDeleteLList(&ueCb->hqUlmap[idx]->hqList);
+               SCH_FREE(ueCb->hqUlmap[idx], sizeof(SchHqUlMap));
+            }
+         }
+         SCH_FREE(ueCb->hqUlmap, sizeof(SchHqUlMap*)*(ueCb->cellCb->numSlots));
+      }
+
       SCH_FREE(ueCb->ueCfg.ambrCfg, sizeof(SchAmbrCfg));
       if(ueCb->ueCfg.spCellCfgPres)
       {
@@ -1217,7 +1243,7 @@ uint8_t MacSchUeDeleteReq(Pst *pst, SchUeDelete  *ueDelete)
  *         RFAILED - failure
  *
  * ****************************************************************/
-uint8_t SchSendCellDeleteRspToMac(SchCellDelete  *ueDelete, Inst inst, SchMacRsp result)
+uint8_t SchSendCellDeleteRspToMac(SchCellDeleteReq  *ueDelete, Inst inst, SchMacRsp result)
 {
    Pst rspPst;
    uint8_t ret=0;
@@ -1358,7 +1384,7 @@ void deleteSchCellCb(SchCellCb *cellCb)
  *
  * ****************************************************************/
 
-uint8_t MacSchCellDeleteReq(Pst *pst, SchCellDelete  *cellDelete)
+uint8_t MacSchCellDeleteReq(Pst *pst, SchCellDeleteReq  *cellDelete)
 {
    uint8_t   cellIdx=0, ret = RFAILED;
    Inst      inst = pst->dstInst - SCH_INST_START;