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