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