e34412ed761b2c3f6ae5cc3a00a10f8041bcd5fc
[o-du/l2.git] / src / 5gnrrlc / kw_dbm_ul.c
1 /*******************************************************************************
2 ################################################################################
3 #   Copyright (c) [2017-2019] [Radisys]                                        #
4 #                                                                              #
5 #   Licensed under the Apache License, Version 2.0 (the "License");            #
6 #   you may not use this file except in compliance with the License.           #
7 #   You may obtain a copy of the License at                                    #
8 #                                                                              #
9 #       http://www.apache.org/licenses/LICENSE-2.0                             #
10 #                                                                              #
11 #   Unless required by applicable law or agreed to in writing, software        #
12 #   distributed under the License is distributed on an "AS IS" BASIS,          #
13 #   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
14 #   See the License for the specific language governing permissions and        #
15 #   limitations under the License.                                             #
16 ################################################################################
17 *******************************************************************************/
18
19 /********************************************************************20**
20   
21         Name:    RLC - Database module file
22     
23         Type:    C source file
24   
25         Desc:    Source code for Database Module functions such as, 
26
27         File:    kw_dbm_ul.c
28   
29 *********************************************************************21*/
30 static const char* RLOG_MODULE_NAME="DBM";
31 static int RLOG_MODULE_ID=2048;
32 static int RLOG_FILE_ID=194;
33
34 \f
35 /* header (.h) include files */
36 #include "common_def.h"
37 #include "lkw.h"           /* LKW defines */
38 #include "ckw.h"           /* CKW defines */
39 #include "kwu.h"           /* KWU defines */
40 #include "rgu.h"           /* RGU defines */
41 #include "kw_err.h"        /* Err defines */
42 #include "kw_env.h"        /* RLC environment options */
43
44 #include "kw.h"            /* RLC defines */
45 #include "kw_ul.h"
46
47 /* extern (.x) include files */
48 #include "lkw.x"           /* LKW */
49 #include "ckw.x"           /* CKW */
50 #include "kwu.x"           /* KWU */
51 #include "rgu.x"           /* RGU */
52
53 #include "kw.x"
54 #include "kw_ul.x"
55
56 /** 
57  * @file gp_dbm_ul.c
58  * @brief RLC Uplink database module
59 */
60
61 #define RLC_MODULE RLC_DBGMASK_DUT
62
63 \f
64 /**
65  * @brief Handler to initialize hash list
66  *       
67  * @details
68  *    This function initializes the UeCb, CellCb and transactions hash lists
69  *
70  * @param[in] gCb   RLC instance control block
71  * 
72  * @return  S16
73  *     -# ROK 
74  *     -# RFAILED 
75 */
76 S16 rlcDbmUlInit(RlcCb *gCb)
77 {
78    /* Initialize ueCb Hash List */
79    if(ROK != cmHashListInit(&(gCb->u.ulCb->ueLstCp), 
80                             (uint16_t) RLC_UE_LIST_BUCKET_SIZE,
81                             (uint16_t) 0, 
82                             (Bool) FALSE, 
83                             (uint16_t) CM_HASH_KEYTYPE_CONID,
84                             RLC_GET_MEM_REGION(gCb), 
85                             RLC_GET_MEM_POOL(gCb)))
86    {
87       RLOG0(L_ERROR, "UeLstCp Initialization Failed");
88       return RFAILED;
89    }
90
91    /* Initialize cellCb Hash List */
92    if(ROK != cmHashListInit(&(gCb->u.ulCb->cellLstCp), 
93                             (uint16_t) RLC_CELL_LIST_BUCKET_SIZE,
94                             (uint16_t) 0, 
95                             (Bool) FALSE, 
96                             (uint16_t) CM_HASH_KEYTYPE_CONID,
97                             RLC_GET_MEM_REGION(gCb), 
98                             RLC_GET_MEM_POOL(gCb)))
99    {
100       cmHashListDeinit(&gCb->u.ulCb->ueLstCp);
101       RLOG0(L_ERROR, "CellLstCp Initialization Failed");
102       return RFAILED;
103    }
104
105    if(ROK != cmHashListInit(&(gCb->u.ulCb->transIdLstCp), 
106                             (uint16_t) RLC_TRANS_ID_LST_BKT_SIZE,
107                             (uint16_t) 0, 
108                             (Bool) FALSE, 
109                             (uint16_t) CM_HASH_KEYTYPE_CONID,
110                             RLC_GET_MEM_REGION(gCb), 
111                             RLC_GET_MEM_POOL(gCb)))
112    {
113       cmHashListDeinit(&gCb->u.ulCb->ueLstCp);
114       cmHashListDeinit(&gCb->u.ulCb->cellLstCp);
115       RLOG0(L_ERROR, "transIdLstCp Initialization Failed");
116       return RFAILED;
117    }
118
119 /* kw005.201 added support for L2 Measurement */         
120 #ifdef LTE_L2_MEAS
121    /* Initialize qcI Hash List */
122 #endif /* LTE_L2_MEAS */
123
124    return (ROK);
125 } /* rlcDbmUlInit */
126
127 \f
128 /**
129  * @brief Handler to De initialize hash list
130  *       
131  * @param[in]    gCb      RLC Instance Control Block
132  *
133  * @return  Void
134 */
135 Void rlcDbmUlDeInit(RlcCb *gCb)
136 {
137
138    /* De Initialize ueCb Hash List */
139    cmHashListDeinit(&(gCb->u.ulCb->ueLstCp));
140
141    /* De Initialize cellCb Hash List */
142    cmHashListDeinit(&(gCb->u.ulCb->cellLstCp));
143
144    /* De Initialize transaction Hash List */
145    cmHashListDeinit(&(gCb->u.ulCb->transIdLstCp));
146 /* kw005.201 added support for L2 Measurement */         
147 #ifdef LTE_L2_MEAS_RLC
148    /* De Initialize qciCb Hash List */
149    cmHashListDeinit(&(rlcCb.rlcL2Cb.qciHlCp));
150 #endif /* LTE_L2_MEAS */
151
152    return;
153 } /* kwDbmDeInit */
154
155
156 /**
157  * @brief Handler to fetch rbCb by the rlcId
158  *       
159  * @details
160  *    This function is invoked by CFG to fetch rbCb from the cellCb/ueCb in
161  *    the upper interface (CKW/KWU).
162  *
163  * @param[in]    gCb     RLC Instance Control Block
164  * @param[in]    rlcId   RLC Identifier 
165  * @param[out]   rbCb    RB Control Block
166  *
167  * @return  Void
168 */
169 Void rlcDbmFetchUlRbCbByRbId
170 (
171 RlcCb         *gCb,
172 CmLteRlcId   *rlcId,  
173 RlcUlRbCb     **rbCb  
174 )
175 {
176    *rbCb= NULLP;
177
178    /* Check for UE CB or CELL CB */
179    if (rlcId->ueId == 0)
180    {
181       RlcUlCellCb *cellCb;
182
183       if(rlcId->rbId >= RLC_MAX_RB_PER_CELL)
184       {
185          RLOG_ARG3(L_ERROR,DBG_RBID,rlcId->rbId ,
186                "Invalid RbId, cellId:%d UEID:%d Max is [%d]",
187                rlcId->cellId, 
188                rlcId->ueId,
189                RLC_MAX_RB_PER_CELL);
190          return;
191       }
192
193       rlcDbmFetchUlCellCb(gCb,rlcId->cellId, &cellCb);
194       if(!cellCb)
195       {
196          RLOG_ARG2(L_ERROR,DBG_CELLID,rlcId->cellId,
197                "CellCb not found RBID:%d UEID:%d",
198                rlcId->rbId,
199                rlcId->ueId);
200          return;
201       }
202
203       *rbCb = cellCb->rbCb[rlcId->rbId];
204    }
205    else
206    {
207       RlcUlUeCb *ueCb;
208
209       if (!(RLC_VALIDATE_UE_RBID(rlcId->rbType, rlcId->rbId)))
210       {
211          RLOG_ARG3(L_ERROR,DBG_RBID, rlcId->rbId,
212                "Invalid RbId for RbType[%d] CELLID:%d UEID:%d", 
213                rlcId->rbType,
214                rlcId->cellId,
215                rlcId->ueId);
216          return;
217       }
218
219       if (rlcDbmFetchUlUeCb(gCb,rlcId->ueId, rlcId->cellId, &ueCb) != ROK)
220       {
221          RLOG_ARG2(L_ERROR,DBG_CELLID, rlcId->cellId,
222                "UeId [%d]: UeCb not found RBID:%d",
223                rlcId->ueId,
224                rlcId->rbId);
225          return;
226       }
227
228       RLC_DBM_GET_RBCB_FROM_UECB(rlcId->rbId, rlcId->rbType, ueCb, *rbCb);
229    }
230    return;
231 } /* rlcDbmFetchUlRbCbByRbId */
232
233 \f
234 /**
235  * @brief Handler to fetch rbCb from Local Channel Id 
236  *
237  * @details
238  *    This function is invoked by CFG to fetch rbCb from the cellCb/ueCb
239  *    from local Channel Id (CKW/KWU).
240  *
241  * @param[in]    gCb      -  RLC Instance Control Block
242  * @param[in]    cellId   -  CELL Identifier 
243  * @param[in]    ueId     -  UE Identifier 
244  * @param[in]    lcId     -  Logical Channel Identifier
245  * @param[out]   rbCb     -  RB Control Block
246  *
247  * @return  Void
248  *
249 */
250 void rlcDbmFetchUlRbCbFromLchId(RlcCb *gCb, CmLteRnti ueId, CmLteCellId cellId,\
251    CmLteLcId lcId, RlcUlRbCb **rbCb)
252 {
253    RlcUlUeCb *ueCb;
254
255    *rbCb = NULLP;
256    
257    /* Check for UE CB or CELL CB */
258    if (ueId == 0)
259    {
260       RlcUlCellCb *cellCb;
261       
262       rlcDbmFetchUlCellCb(gCb,cellId, &cellCb);
263       if(!cellCb)
264       {
265          DU_LOG("\nRLC : rlcDbmFetchUlRbCbFromLchId: CellCb[%d] not found UEID:%d",\
266             cellId, ueId);
267          return;
268       }
269
270       *rbCb = cellCb->lCh[lcId - 1].ulRbCb;
271       return;
272    }
273    
274    if (rlcDbmFetchUlUeCb(gCb,ueId, cellId, &ueCb) != ROK)
275    {
276       DU_LOG("\nRLC : rlcDbmFetchUlRbCbFromLchId: UeId [%d]: UeCb not found",ueId);
277       return;
278    }
279
280    *rbCb = ueCb->lCh[lcId - 1].ulRbCb;
281
282    return;
283 } /* kwDbmFetchRbCbFromLchId */
284
285 \f
286 /**
287  * @brief Handler to delete RbCb
288  *       
289  * @details 
290  *    This function is invoked by CFG to remove RbCb from Ue/Cell hashlist 
291  *
292  * @param[in] gCb       - RLC Instance Control Block
293  * @param[in] rbCbLst   - Rb Cb List
294  * @param[in] numRbCb   - Number of rbCbs
295  *
296  * @return  Void
297  *
298 */
299 Void rlcDbmDelAllUlRb
300 (
301 RlcCb       *gCb,
302 RlcUlRbCb   **rbCbLst,          
303 uint8_t     numRbCb            
304 )
305 {
306    uint32_t idx; /* Index */
307
308    for (idx = 0; idx < numRbCb; idx++)
309    {
310       if (rbCbLst[idx] != NULLP)
311       {
312          /* Free the Buffers of RbCb */
313          if( CM_LTE_MODE_UM == rbCbLst[idx]->mode ) 
314          {
315             rlcUmmFreeUlRbCb(gCb,rbCbLst[idx]);
316          }
317          else if(CM_LTE_MODE_AM == rbCbLst[idx]->mode) 
318          {
319             rlcAmmFreeUlRbCb(gCb,rbCbLst[idx]);
320          }
321      
322          RLC_FREE (gCb,rbCbLst[idx], sizeof (RlcUlRbCb));
323       }
324    }
325
326    return;
327 } /* kwDbmDelAllRb */
328
329 \f
330 /**
331  * @brief  Handler to create an UeCb
332  *
333  * @details  
334  *    This function is invoked by CFG to create UeCb and insert into the 
335  *    Ue hashlist of RlcCb.
336  *
337  * @param[in] gCb       RLC Instance Control Block
338  * @param[in] ueId      UE Identifier 
339  * @param[in] cellId    Cell Identifier 
340  * @param[in] ueCb      UE Control Block 
341  *
342  * @return  S16
343  *    -# ROK 
344  *    -# RFAILED 
345  *
346 */
347 S16 rlcDbmAddUlUeCb
348 (
349 RlcCb          *gCb,
350 CmLteRnti     ueId,       
351 CmLteCellId   cellId,    
352 RlcUlUeCb      *ueCb    
353 )
354 {
355
356    ueCb->ueId = ueId;
357    ueCb->cellId = cellId;
358
359    if(ROK != cmHashListInsert(&(gCb->u.ulCb->ueLstCp), 
360                               (PTR)ueCb, 
361                               (uint8_t *)&(ueCb->ueId),
362                               (uint16_t) sizeof(CmLteRnti)))
363    {
364       RLOG_ARG1(L_ERROR,DBG_CELLID,cellId,
365             "UeId[%u] HashList Insertion Failed",
366             ueId);
367       return RFAILED;
368    }
369    /* kw005.201 ccpu00117318, updating the statistics */
370    gCb->genSts.numUe++;
371
372
373    return ROK;
374
375
376 \f
377 /**
378  * @brief Handler to add a transaction 
379  *
380  * @details
381  *    This function adds a transaction. 
382  *
383  * @param[in] gCb     RLC Instance Control Block
384  * @param[in] cfg     Configuration information
385  *
386  * @return  S16
387  *    -# ROK 
388  *    -# RFAILED 
389  *
390 */
391 S16 rlcDbmAddUlTransaction 
392 (
393 RlcCb        *gCb,
394 RlcUlCfgTmpData   *cfg
395 )
396 {
397 #ifndef ALIGN_64BIT
398    RLOG1(L_DEBUG, "(transId(%ld)", cfg->transId);
399 #else
400    RLOG1(L_DEBUG, "(transId(%d))", cfg->transId);
401 #endif
402
403    return (cmHashListInsert(&(gCb->u.ulCb->transIdLstCp), 
404                              (PTR)cfg, 
405                              (uint8_t *)&(cfg->transId), 
406                              (uint16_t) sizeof(cfg->transId)));
407
408
409 \f
410 /**
411  * @brief Handler to find a transaction 
412  *       
413  * @details
414  *    This function find transaction using transaction Id 
415  *
416  *
417  * @param[in] gCb       RLC Instance Control Block
418  * @param[in] transId   Transaction Id 
419  * @param[out] cfg      Configuration information attached to this transaction
420  *
421  * @return  S16
422  *    -# ROK 
423  *    -# RFAILED 
424  *
425 */
426 S16 rlcDbmFindUlTransaction
427 (
428 RlcCb             *gCb,
429 uint32_t          transId,
430 RlcUlCfgTmpData   **cfg
431 )
432 {
433
434    if(ROK != cmHashListFind(&(gCb->u.ulCb->transIdLstCp),
435                             (uint8_t *) &transId, 
436                             sizeof (transId), 
437                             RLC_DEF_SEQ_NUM,(PTR *) cfg))
438    {
439       RLOG1(L_ERROR,"TransId [%ld] not found",transId);
440       return RFAILED;
441    }
442    return ROK;
443 }
444
445 \f
446 /**
447  *
448  * @brief Handler to delete a transaction 
449  *
450  * @details
451  *    This function deletes a transaction 
452  *
453  *
454  *  @param[in] gCb     RLC Instance Control Block
455  *  @param[in] cfg     Configuration information
456  *
457  *  @return  S16
458  *      -# ROK 
459  *      -# RFAILED 
460  *
461 */
462 S16 rlcDbmDelUlTransaction
463 (
464 RlcCb             *gCb,
465 RlcUlCfgTmpData   *cfg       
466 )
467 {
468
469    if(cmHashListDelete(&(gCb->u.ulCb->transIdLstCp),(PTR) (cfg)) != ROK) 
470    {
471       RLOG0(L_ERROR,"HashList Deletion failed");
472       return RFAILED;
473    }
474
475    return ROK;
476 }
477
478 \f
479 /**
480  * @brief Handler to delete all transaction 
481  *
482  * @details
483  *    This function deletes all transaction 
484  *
485  * @param[in] gCb     RLC Instance Control Block
486  *
487  * @return  S16
488  *    -# ROK 
489  *    -# RFAILED 
490  *
491 */
492 S16 rlcDbmDelAllUlTransactions(RlcCb *gCb)
493 {
494    RlcUlCfgTmpData *cfg = NULL;
495
496    /* Until no more ueCb is ueLstCp hash list get and delete ueCb */
497    while (ROK == cmHashListGetNext(&(gCb->u.ulCb->transIdLstCp), 
498                                    (PTR) cfg, 
499                                    (PTR *)&cfg))
500    {
501       if(rlcDbmDelUlTransaction(gCb, cfg) != ROK)
502       {
503          return RFAILED;
504       }
505       
506       cfg = NULLP;
507    }
508
509    return ROK;
510 }
511
512 \f
513 /**
514  * @brief Handler to Fetch an UeCb
515  *
516  * @details
517  *    This function is invoked by CFG to fetch UeCb from the Ue hashlist 
518  *    of RlcCb.
519  *
520  * @param[in]    gCb       RLC Instance Control Block 
521  * @param[in]    ueId      UE Identifier 
522  * @param[in]    cellId    Cell Identifier 
523  * @param[out]   ueCb      UE Control Block
524  *
525  * @return  S16
526  *    -# ROK 
527  *    -# RFAILED 
528 */
529 uint8_t rlcDbmFetchUlUeCb(RlcCb *gCb, CmLteRnti ueId, CmLteCellId  cellId, RlcUlUeCb **ueCb)
530 {
531    return (cmHashListFind(&(gCb->u.ulCb->ueLstCp), 
532                            (uint8_t *)&(ueId), sizeof(CmLteRnti),
533                            RLC_DEF_SEQ_NUM, 
534                            (PTR *) ueCb));
535 }
536
537 \f
538 /**
539  * @brief Handler to delete an UeCb
540  *
541  * @details
542  *    This function is invoked by CFG to delete UeCb from the Ue hashlist 
543  *    of RlcCb.
544  *
545  *
546  * @param[in] gCb      RLC Instance Control Block
547  * @param[in] ueCb     UE Control Block
548  * @param[in] abrtFlag Abort Flag
549  *
550  * @return Void
551  *
552 */
553 Void rlcDbmDelUlUeCb
554 (
555 RlcCb       *gCb,
556 RlcUlUeCb   *ueCb,       
557 Bool       abortFlag   
558 )
559 {
560
561 #if  (!defined(KW_PDCP) || !(defined(PJ_SEC_ASYNC) || defined(PJ_CMP_ASYNC)))
562    UNUSED(abortFlag);
563 #endif /* (!defined(KW_PDCP) || ! (defined(PJ_SEC_ASYNC) || defined(PJ_CMP_ASYNC)))*/
564
565    /* Delete all logical channels */
566    RLC_MEM_ZERO(ueCb->lCh,sizeof(RlcUlLch) * RLC_MAX_LCH_PER_UE);
567
568    /* Delete all SRB RbCbs in UeCb */
569    rlcDbmDelAllUlRb(gCb,ueCb->srbCb, RLC_MAX_SRB_PER_UE);
570
571    /* Delete all DRB RbCbs in UeCb */
572    rlcDbmDelAllUlRb(gCb,ueCb->drbCb, RLC_MAX_DRB_PER_UE);
573
574    /* Delete ueCb entry from ueLstCp */
575    if(ROK != cmHashListDelete(&(gCb->u.ulCb->ueLstCp), (PTR) ueCb))
576    {
577       RLOG_ARG1(L_ERROR,DBG_UEID,ueCb->ueId,
578             "HashList Deletion Failed cellId(%d)",
579             ueCb->cellId);
580    }
581    /* kw005.201 ccpu00117318, updating the statistics */
582    gCb->genSts.numUe--;
583    /* Deallocate ueCb */
584    RLC_FREE(gCb,ueCb, sizeof(RlcUlUeCb));
585
586    return;
587 }
588 \f
589 /**
590  * @brief Handler to delete all UeCbs
591  *
592  * @details
593  *    This function is invoked by CFG to delete all UeCbs from the Ue 
594  *    hashlist of RlcCb.
595  *
596  * @param[in] gCb      RLC Instance Control Block
597  *
598  * @return  Void
599 */
600 Void rlcDbmDelAllUlUe(RlcCb *gCb)
601 {
602    RlcUlUeCb *ueCb = NULLP;  /* UE Control Block */
603
604    /* Until no more ueCb is ueLstCp hash list get and delete ueCb */
605    while (ROK == cmHashListGetNext(&(gCb->u.ulCb->ueLstCp), 
606                                    (PTR) ueCb, 
607                                    (PTR *)&ueCb))
608    {
609       rlcDbmDelUlUeCb(gCb,ueCb, TRUE);
610
611       ueCb = NULLP;
612    }
613
614    return;
615 }
616
617
618 /**
619  * @brief Handler to create CellCb
620  *
621  * @details
622  *    This function is invoked by CFG to create CellCb and insert into
623  *    the Cell hashlist of RlcCb.
624  *
625  *  @param[in] gCb      RLC Instance Control Block
626  *  @param[in] cellId   Cell Identifier 
627  *  @param[in] cellCb   Cell Control Block 
628  *
629  *  @return  S16
630  *     -# ROK 
631  *     -# RFAILED 
632 */
633 S16 rlcDbmAddUlCellCb
634 (
635 RlcCb          *gCb,
636 CmLteCellId   cellId,    
637 RlcUlCellCb    *cellCb  
638 )
639 {
640    RlcUlCellCb *tCellCb; 
641
642    tCellCb = cellCb;
643    tCellCb->cellId = cellId;
644
645    if(ROK != cmHashListInsert(&(gCb->u.ulCb->cellLstCp), 
646                               (PTR) tCellCb,
647                               (uint8_t *)&(tCellCb->cellId), 
648                               (uint16_t) sizeof(CmLteCellId)))
649    {
650       RLOG_ARG0(L_ERROR,DBG_CELLID,tCellCb->cellId,
651             "HashList Insertion Failed");
652       return RFAILED;
653    }
654
655    return ROK;
656
657
658 \f
659 /**
660  * @brief Handler to Fetch an CellCb
661  *       
662  * @details
663  *    This function is invoked by CFG to fetch UeCb from the Ue hashlist 
664  *    of RlcCb.
665  *
666  * @param[in]    gCb      RLC Instance Control Block
667  * @param[in]    cellId   Cell Identifier 
668  * @param[out]   cellCb   UE Control Block
669  *
670  * @return  S16
671  *    -# ROK 
672  *    -# RFAILED 
673  *
674 */
675 void rlcDbmFetchUlCellCb(RlcCb *gCb, CmLteCellId cellId, RlcUlCellCb **cellCb)
676 {
677    *cellCb = NULLP;
678    if(ROK != cmHashListFind(&(gCb->u.ulCb->cellLstCp), 
679                             (uint8_t *)&(cellId),sizeof(CmLteCellId), 
680                             RLC_DEF_SEQ_NUM, (PTR*) cellCb))
681    {
682       DU_LOG("\nRLC : rlcDbmFetchUlCellCb : CellCb[%d] not found", cellId);
683    }
684
685    return;
686 }
687
688 \f
689 /**
690  * @brief Handler to delete CellCb
691  *
692  * @details
693  *    This function is invoked by CFG to delete CellCb from the Cell hashlist 
694  *    of RlcCb.
695  *
696  *  @param[in] gCb      RLC Instance Control Block
697  *  @param[in] cellCb   Cell Control Block
698  *
699  *  @return  Void
700 */
701 Void rlcDbmDelUlCellCb(RlcCb *gCb,RlcUlCellCb *cellCb)
702 {
703
704    /* Delete all rbCbs in cellCb */
705    rlcDbmDelAllUlRb(gCb,cellCb->rbCb, RLC_MAX_RB_PER_CELL);
706
707    /* Delete cellCb entry in hash list cellLstCp */
708    if(ROK != cmHashListDelete(&(gCb->u.ulCb->cellLstCp), (PTR) cellCb))
709    {
710       RLOG_ARG0(L_ERROR,DBG_CELLID,cellCb->cellId,
711             "HashList Deletion Failed");
712    }
713    /* Deallocate cellCb */
714    RLC_FREE(gCb, cellCb, sizeof(RlcUlCellCb));
715
716    return;
717 } /* kwDbmDelCellCb */
718
719 \f
720 /**
721  * @brief Handler to delete all UeCbs
722  *       
723  * @details
724  *    This function is invoked by CFG to delete all UeCbs from the Ue
725  *    hashlist of RlcCb.
726  * @param[in] gCb      RLC Instance Control Block
727  *
728  * @return  Void
729 */
730 Void rlcDbmDelAllUlCell(RlcCb *gCb)
731 {
732    RlcUlCellCb *cellCb = NULLP; /* Cell Control Block */
733
734    /* Until no more cellCb is ueLstCp hash list get and delete cellCb */
735    while (ROK == cmHashListGetNext(&(gCb->u.ulCb->cellLstCp), 
736                                    (PTR) cellCb, 
737                                    (PTR *)&cellCb))
738    {
739       rlcDbmDelUlCellCb(gCb,cellCb);
740
741       cellCb = NULLP;
742    }
743
744    return;
745
746
747 \f
748 /**
749  * @brief Handler to delete all UeCbs and CellCbs
750  *       
751  * @details
752  *    This function is invoked by LMM to delete all UeCbs from the Ue
753  *    hashlist of RlcCb and cellCbs from the Cell hashlist of rlcCb.
754  * 
755  * @param[in] gCb      RLC Instance Control Block
756  *
757 */
758 Void rlcDbmUlShutdown(RlcCb *gCb)
759 {
760
761    rlcDbmDelAllUlCell(gCb);
762
763    rlcDbmDelAllUlUe(gCb);
764
765    rlcDbmUlDeInit(gCb);
766
767    return;
768 }
769
770
771 /********************************************************************30**
772   
773          End of file
774 **********************************************************************/