implementation of RLC UE delete req and rsp JIRA-ID : ODUHIGH-43
[o-du/l2.git] / src / 5gnrrlc / kw_udx_dl.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  
21     Name:   NR RLC layer
22  
23     Type:   C include file
24  
25     Desc:   Defines required by LTE MAC
26  
27     File:   kw_udx_dl.c
28
29 **********************************************************************/
30
31 /* header include files (.h) */
32 #include "common_def.h"
33 #include "lkw.h"           /* LKW defines */
34 #include "ckw.h"           /* CKW defines */
35 #include "kwu.h"           /* KWU defines */
36 #include "rgu.h"           /* RGU defines */
37 #include "kw_err.h"        /* Err defines */
38 #include "kw_env.h"        /* RLC environment options */
39
40 #include "kw.h"            /* RLC defines */
41 #include "kw_udx.h"
42 #include "kw_dl.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_udx.x"
52 #include "kw_dl.x"
53
54
55 #define RLC_MODULE RLC_DBGMASK_UDX
56 /* local defines */
57
58 S16 rlcDlmHndlStaRsp ARGS (( RlcCb  *gCb,RlcDlRbCb  *rbCb,
59                 RlcUdxStaPdu *pStaPdu, RlcUdxBufLst  *rlsPduLst));
60
61
62
63
64 /**
65   * @brief
66   * UDX APIs
67   */
68
69 /**
70  *
71  * @brief 
72  *    Handler to bind the DL with UL. 
73  *
74  * @param[in] pst   Post structure  
75  * @param[in] suId  Service user SAP ID 
76  * @param[in] spId  Service provider ID
77  *
78  * @return  S16
79  *    -# ROK 
80  *    -# RFAILED
81  */
82 S16 rlcDlUdxBndReq 
83 (
84 Pst    *pst,  
85 SuId   suId, 
86 SpId   spId 
87 )
88 {
89    RlcUdxDlSapCb   *udxSap;            /* pointer to session SAP */
90    RlcCb           *tRlcCb;
91
92 #if (ERRCLASS & ERRCLS_INT_PAR)
93    if (pst->dstInst >= MAX_RLC_INSTANCES)
94    {
95       return RFAILED;
96    }
97 #endif
98    tRlcCb = RLC_GET_RLCCB(pst->dstInst);
99
100    RLCDBGP_BRIEF(tRlcCb, "rlcDlUdxBndReq(spId(%d), suId(%d))\n", 
101                 spId, suId);
102
103    udxSap = (tRlcCb->u.dlCb->udxDlSap + spId);
104
105    /* Verify CKW SAP State */
106    switch(udxSap->state)
107    {
108       /* SAP is configured but not bound */
109       case RLC_SAP_CFG:
110       case RLC_SAP_UBND:
111       {
112          /* copy bind configuration parameters in SSAP sap */
113          udxSap->suId = suId;
114          udxSap->pst.dstProcId = pst->srcProcId;
115          udxSap->pst.dstEnt = pst->srcEnt;
116          udxSap->pst.dstInst = pst->srcInst;
117
118          /* Update the State */
119          udxSap->state = RLC_SAP_BND;
120
121          DU_LOG("\nINFO   --> RLC_DL : UDX SAP state [%d]", udxSap->state);
122          break;
123       }
124       /* SAP is already bound */
125       case RLC_SAP_BND:
126       {
127          /* 
128           * Sap is already bound check source, destination Entity and 
129           * Proc Id
130           */
131          if (udxSap->pst.dstProcId != pst->srcProcId 
132                || udxSap->pst.dstEnt != pst->srcEnt
133                || udxSap->pst.dstInst != pst->srcInst
134                || udxSap->suId != suId)
135          {
136             RLC_SEND_SAPID_ALARM(tRlcCb, spId, 
137                                 LKW_EVENT_UDX_BND_REQ, LCM_CAUSE_INV_PAR_VAL);
138
139             DU_LOG("\nERROR  --> RLC_DL : UDX SAP already Bound");
140             rlcDlUdxBndCfm(&(udxSap->pst), udxSap->suId, CM_BND_NOK);
141          }
142          break;
143       }
144
145      default:
146       {
147 #if (ERRCLASS & ERRCLS_INT_PAR)
148          RLC_SEND_SAPID_ALARM(tRlcCb,spId, 
149                              LKW_EVENT_CKW_BND_REQ, LCM_CAUSE_INV_STATE);
150 #endif /* ERRCLASS & ERRCLS_INT_PAR */
151          DU_LOG("\nERROR  --> RLC_DL : Invalid UDX SAP State in Bind Req");
152          rlcDlUdxBndCfm(&(udxSap->pst), udxSap->suId, CM_BND_NOK);
153          break;
154       }
155    }
156    rlcDlUdxBndCfm(&(udxSap->pst), udxSap->suId, CM_BND_OK);
157    return ROK;
158
159
160 \f
161 /**
162  * @brief 
163  *    Handler for unbinding the DL from UL. 
164  *
165  *  @param[in] pst     Post structure  
166  *  @param[in] spId    Service provider SAP ID 
167  *  @param[in] reason  Reason for Unbinding 
168  *
169  *  @return  S16
170  *      -# ROK 
171  */
172 S16 rlcDlUdxUbndReq
173 (
174 Pst      *pst,    
175 SpId     spId,   
176 Reason   reason 
177 )
178 {
179    RlcUdxDlSapCb   *udxSap; 
180    RlcCb           *tRlcCb;
181
182 #if (ERRCLASS & ERRCLS_INT_PAR)
183    if (pst->dstInst >= MAX_RLC_INSTANCES)
184    {
185       return RFAILED;
186    }
187 #endif
188
189    tRlcCb = RLC_GET_RLCCB(pst->dstInst);
190
191    DU_LOG("\nDEBUG  --> RLC_DL : Unbind Req for spId[%d], reason[%d]", 
192                 spId, reason);
193    UNUSED(reason);
194    /* disable upper sap (CKW) */
195    udxSap = (tRlcCb->u.dlCb->udxDlSap + spId);
196
197 #if (ERRCLASS & ERRCLS_INT_PAR)
198    RLC_GET_AND_VALIDATE_UDXSAP(tRlcCb,udxSap, EKW208, "KwUiDlUdxndReq");
199 #endif /* ERRCLASS & ERRCLS_INT_PAR */
200    udxSap->state = RLC_SAP_CFG;
201    return ROK;
202 }
203
204 \f
205 /**
206  * @brief 
207  *    Handler for configuring RLC entities.
208  *
209  * @details
210  *    This function is used by RRC to configure(add/delete/modify)
211  *    one or more RLC entities. 
212  *        - CKW_CFG_ADD          => rlcCfgAddRb
213  *        - CKW_CFG_MODIFY       => rlcCfgReCfgRb
214  *        - CKW_CFG_DELETE       => rlcCfgDelRb
215  *        - CKW_CFG_REESTABLISH  => rlcCfgReEstRb
216  *        - CKW_CFG_DELETE_UE    => rlcCfgDelUe
217  *
218  * @param[in] pst   -  Post structure  
219  * @param[in] spId  -  Serive Provider ID 
220  * @param[in] cfg   -  Configuration information for one or more RLC entities. 
221  *
222  * @return  S16
223  *    -# ROK 
224  *    -# RFAILED
225  */
226 S16 rlcDlUdxCfgReq
227 (
228 Pst          *pst,
229 SpId         spId,
230 RlcCfgInfo   *cfg
231 )
232 {
233    RlcCfgCfmInfo   *cfgCfm; 
234    uint8_t         idx;    
235    RlcCb           *tRlcCb;
236    Pst             *pstUdxCfm;
237
238 #if (ERRCLASS & ERRCLS_INT_PAR)
239    if (pst->dstInst >= MAX_RLC_INSTANCES)
240    {
241       return RFAILED;
242    }
243 #endif
244
245    tRlcCb = RLC_GET_RLCCB(pst->dstInst);
246
247    pstUdxCfm = &(tRlcCb->u.dlCb->udxDlSap[spId].pst);
248    RLCDBGP_BRIEF(tRlcCb,"spId(%d)\n", spId);
249    /* Allocate memory and memset to 0 for cfmInfo */
250    RLC_ALLOC_SHRABL_BUF_WC(pstUdxCfm->region,
251                           pstUdxCfm->pool,
252                           cfgCfm,
253                           sizeof(RlcCfgCfmInfo));
254
255 #if (ERRCLASS & ERRCLS_ADD_RES)
256    if (cfgCfm == NULLP)
257    {
258       DU_LOG("\nERROR  --> RLC_DL : Memory Allocation Failed.");
259       /* kw002.201 Freeing from proper region */
260       /* RLC_PST_FREE(pst->region, pst->pool, cfg, sizeof(RlcCfgInfo)); */
261       return RFAILED;
262    }
263 #endif /* ERRCLASS & ERRCLS_ADD_RES */
264
265    /* For every entity configuration process by cfgType */
266    for (idx = 0; idx < cfg->numEnt; idx++)
267    {
268       RlcEntCfgCfmInfo   *entCfgCfm;
269       RlcEntCfgInfo      *entCfg;
270
271       entCfg  = (RlcEntCfgInfo *)&(cfg->entCfg[idx]);
272       entCfgCfm   = (RlcEntCfgCfmInfo *)&(cfgCfm->entCfgCfm[idx]);
273
274       switch (entCfg->cfgType)
275       {
276          case CKW_CFG_ADD:
277             {
278                if (entCfg->dir & RLC_DIR_DL)
279                { 
280                   /* Add a new RB entity configuration */
281                   if (rlcCfgAddDlRb(tRlcCb,cfg->ueId, cfg->cellId,\
282                               entCfg, entCfgCfm) != ROK)
283                   {
284                      DU_LOG("\nERROR  --> RLC_DL : Addition Failed due to[%d]",
285                            entCfgCfm->status.reason);
286                   }
287                }
288                break;
289             }
290          case CKW_CFG_MODIFY:
291             {
292                if (entCfg->dir & RLC_DIR_DL)
293                {
294                   /* Re-configure the existing RB entity configuration */
295                   if (rlcCfgReCfgDlRb(tRlcCb,cfg->ueId, cfg->cellId,\
296                            entCfg, entCfgCfm) != ROK)
297                   {
298                      DU_LOG("\nERROR  --> RLC_DL : ReCfg Failed due to[%d]",
299                            entCfgCfm->status.reason);
300                   }
301                }
302                break;
303             }
304
305          case CKW_CFG_DELETE:
306             {
307                if (entCfg->dir & RLC_DIR_DL)
308                {
309                   /* Delete the existing RB entity configuration */
310                   if (rlcCfgDelDlRb(tRlcCb,cfg->ueId, cfg->cellId,\
311                         entCfg, entCfgCfm) != ROK)
312                   {
313                      DU_LOG("\nERROR  --> RLC_DL : Deletion Failed due to[%d]",
314                            entCfgCfm->status.reason);
315                   } 
316                }
317                break;
318             }
319
320          case CKW_CFG_REESTABLISH:
321             {
322                if (entCfg->dir & RLC_DIR_DL)
323                {
324                   /*if direction is both then, re-establishment end indication
325                    * should be sent only from the UL instance, only if DIR is
326                    * DL only then DL instance will send indication.*/
327                   Bool sndReEst = TRUE;
328                   if (entCfg->dir & RLC_DIR_UL)
329                   {
330                      sndReEst = FALSE;
331                   }
332                   /* Re-establish the existing RB entity configuration */
333                   if (rlcCfgReEstDlRb(tRlcCb,cfg->ueId, cfg->cellId,
334                                      sndReEst,entCfg, entCfgCfm) != ROK)
335                   {
336                      DU_LOG("\nERROR  --> RLC_DL : Reest Failed due to[%d]",
337                            entCfgCfm->status.reason);
338                   }
339                }
340                break;
341             }
342
343          case CKW_CFG_DELETE_UE:
344             {
345                /* Delete all RB entity configuration under UE */
346                if (rlcCfgDelDlUe(tRlcCb,cfg->ueId, cfg->cellId,
347                                 entCfg, entCfgCfm) != ROK)
348                {
349                   DU_LOG("\nERROR  --> RLC_DL : deletion Failed due to[%d]",
350                            entCfgCfm->status.reason);
351                }
352                else
353                {
354                   DU_LOG("\nDEBUG  -->  RLC_DL: UE information is deleted for UEIdx[%d] and CellId[%d]",\
355                   cfg->ueId, cfg->cellId);
356                }
357                break;
358             }
359          case CKW_CFG_DELETE_CELL:
360             {
361                if (rlcCfgDelDlCell(tRlcCb,cfg->cellId,entCfg,entCfgCfm) 
362                                                                 != ROK )
363                {
364                   DU_LOG("\nERROR  --> RLC_DL : deletion Failed due to[%d]",
365                            entCfgCfm->status.reason);
366                } 
367                break;
368             }
369
370          default:
371             {
372                RLC_CFG_FILL_CFG_CFM(entCfgCfm, entCfg->rbId, entCfg->rbType,\
373                                    CKW_CFG_CFM_NOK, CKW_CFG_REAS_INVALID_CFG);
374                DU_LOG("\nERROR  --> RLC_DL : Invalid CfgType");
375             }
376       }
377    }
378
379    /* Assign number of entity configuraitons and suId */
380    cfgCfm->transId = cfg->transId;
381    cfgCfm->ueId = cfg->ueId;
382    cfgCfm->cellId = cfg->cellId;
383    cfgCfm->numEnt = cfg->numEnt;
384
385    /* kw002.201 Freeing from proper region */
386    /* RLC_PST_FREE(pst->region, pst->pool, cfg, sizeof(RlcCfgInfo)); */
387    /* Send Configuration confirm primitive */
388    rlcDlUdxCfgCfm(&(tRlcCb->u.dlCb->udxDlSap[spId].pst),
389                  tRlcCb->u.dlCb->udxDlSap[spId].suId, 
390                  cfgCfm);
391
392    return ROK;
393
394
395 /**
396  *@brief 
397  *   This primitive is used by RRC to change the UeId for the existing UE
398  *   context.
399  *
400  * @param pst     -  Pointer to the pst structure
401  * @param spId    -  The ID of the service provider SAP in the RLC layer 
402  * @param transId -  Transaction ID. This field uniquily identifies
403  *                   transaction between RRC and RLC
404  * @param ueInfo    -  Old UE Id Info for which the change request has come 
405  * @param newUeInfo -  New UE Id Info for existing UE context 
406  * 
407  * @return 
408  *    -# ROK
409  *    -# RFAILED
410  */
411 S16 rlcDlUdxUeIdChgReq
412 (
413 Pst         *pst, 
414 SpId        spId, 
415 uint32_t    transId, 
416 CkwUeInfo   *ueInfo,
417 CkwUeInfo   *newUeInfo
418 )
419 {
420    CmStatus       status;
421    RlcCb           *tRlcCb;
422
423 #if (ERRCLASS & ERRCLS_INT_PAR)
424    if (pst->dstInst >= MAX_RLC_INSTANCES)
425    {
426       return RFAILED;
427    }
428 #endif
429
430    tRlcCb = RLC_GET_RLCCB(pst->dstInst);
431 #ifndef ALIGN_64BIT
432    RLCDBGP_BRIEF(tRlcCb, "(spId(%d), transId(%ld))\n", 
433                 spId, transId);
434 #else
435    RLCDBGP_BRIEF(tRlcCb, "(spId(%d), transId(%d))\n", 
436                 spId, transId);
437 #endif
438
439    status.reason = CKW_CFG_REAS_NONE;
440    status.status = CKW_CFG_CFM_OK;
441    
442    if (rlcCfgDlUeIdChng(tRlcCb, ueInfo, newUeInfo, &status) != ROK)
443    {
444       DU_LOG("\nERROR  --> RLC_DL : Failure due to[%d]",
445              status.reason);
446    }
447    rlcDlUdxUeIdChgCfm(&(tRlcCb->u.dlCb->udxDlSap[spId].pst),
448                      tRlcCb->u.dlCb->udxDlSap[spId].suId, 
449                      transId, 
450                      status);
451
452    return ROK;
453
454
455 /**
456 * @brief 
457 *    Request for status PDU from  ULM to DLM.
458 *
459 * @param[in]   pst   -  Post Structure
460 * @param[in]   spId  -  Service Provider Id
461 * @param[in]   rlcId -  Rlc Information Id
462 * @param[in]   pStaPdu - Status PDU 
463 *  
464 * @return   S16
465 *    -# ROK
466 *    -# RFAILED
467 **/
468 S16  rlcDlUdxStaPduReq
469 (
470 Pst             *pst,
471 SpId            spId,
472 CmLteRlcId      *rlcId,
473 RlcUdxDlStaPdu   *pStaPdu
474 )
475 {
476    RlcDlRbCb   *rbCb;
477    RlcCb       *tRlcCb;
478
479    tRlcCb =  RLC_GET_RLCCB (pst->dstInst);
480
481    rlcDbmFetchDlRbCbByRbId(tRlcCb, rlcId, &rbCb); /* Fetch DBM RbCb */
482    if (!rbCb)
483    {
484       DU_LOG("\nERROR  --> RLC_DL : CellId [%u]:RbId[%d] not found",
485             rlcId->cellId,rlcId->rbId);
486       RLC_FREE_SHRABL_BUF(pst->region, 
487                          pst->pool, 
488                          pStaPdu, 
489                          sizeof(RlcUdxDlStaPdu));
490       return RFAILED;
491    }
492
493    RLC_AMDL.cntrlBo = pStaPdu->controlBo;
494    /* If there already exists a STAUS PDU, free it and take the new one
495       into account */
496    if(RLC_AMDL.pStaPdu)
497    {
498       RLC_FREE_SHRABL_BUF(pst->region, 
499                          pst->pool, 
500                          RLC_AMDL.pStaPdu, 
501                          sizeof(RlcUdxDlStaPdu));
502    }
503    
504    RLC_AMDL.pStaPdu = pStaPdu;
505    rlcAmmSendDedLcBoStatus(tRlcCb, rbCb, &RLC_AMDL);             
506
507    return  (ROK);
508 }
509
510 /**
511 * @brief 
512 *    It handles the status update recieved from ULM.
513 *
514 * @param[in]   pst   -  Post Structure
515 * @param[in]   spId  -  Service Provider Id
516 * @param[in]   rlcId -  Rlc Information Id
517 * @param[in]   pStaPdu - Status PDU 
518 *  
519 * @return   S16
520 *    -# ROK
521 *    -# RFAILED
522 **/
523 S16  rlcDlUdxStaUpdReq
524 (
525 Pst*          pst,
526 SpId          spId,
527 CmLteRlcId    *rlcId,
528 RlcUdxStaPdu   *pStaPdu
529 )
530 {
531    RlcCb          *tRlcCb;
532    RlcDlRbCb      *rbCb;
533
534    tRlcCb = RLC_GET_RLCCB(pst->dstInst);
535
536    rlcDbmFetchDlRbCbByRbId(tRlcCb, rlcId, &rbCb);
537    if (!rbCb)
538    {
539       DU_LOG("\nERROR  --> RLC_DL : CellId [%u]:RbId[%d] not found",
540             rlcId->cellId,rlcId->rbId);
541       return RFAILED;
542    }
543
544    rlcAmmDlHndlStatusPdu(tRlcCb, rbCb, pStaPdu);
545
546    RLC_FREE_SHRABL_BUF(pst->region,
547                       pst->pool, 
548                       pStaPdu, 
549                       sizeof(RlcUdxStaPdu));
550
551    return ROK;
552 }
553
554 #ifdef LTE_L2_MEAS
555 /**
556 */
557 S16 rlcDlUdxL2MeasReq 
558 (
559 Pst            *pst, 
560 RlcL2MeasReqEvt *measReqEvt 
561 )
562 {
563    uint32_t  cntr;
564    uint8_t   measType;
565    volatile uint32_t     startTime = 0;
566    RlcCb     *tRlcCb;
567
568    /*starting Task*/
569    SStartTask(&startTime, PID_RLC_MEAS_START);
570
571    tRlcCb =  RLC_GET_RLCCB(pst->dstInst);
572
573    /* Initialize measCfmEvt */
574
575   /* validate the received measReqEvt */
576  /*LTE_L2_MEAS_PHASE2*/
577
578    measType = measReqEvt->measReq.measType;
579
580    if(measType & LKW_L2MEAS_DL_IP) 
581    {
582       /* if measurement is for DL IP enable for all QCI */
583       for(cntr = 0; cntr < LKW_MAX_QCI; cntr++)
584       {
585          tRlcCb->u.dlCb->rlcL2Cb.measOn[cntr] |= LKW_L2MEAS_DL_IP;
586       }
587    }
588    else
589    {
590       /* for nonIpThroughput meas, enable only for the sent QCIs */
591       uint32_t i;
592       for(i = 0; i < LKW_MAX_QCI; i++)
593       {
594          tRlcCb->u.dlCb->rlcL2Cb.measOn[i] |= measType;
595       }
596    }
597
598    /* We need to copy the transId for sending back confirms later */
599    for(cntr = 0; cntr < LKW_MAX_L2MEAS; cntr++)
600    {
601       RlcL2MeasEvtCb* measEvtCb = &(tRlcCb->u.dlCb->rlcL2Cb.rlcL2EvtCb[cntr]);
602       if(measEvtCb->measCb.measType & measType)
603       {
604          measEvtCb->transId= measReqEvt->transId;
605       }
606    }
607
608    /*stopping Task*/
609    SStopTask(startTime, PID_RLC_MEAS_START);
610    return ROK;
611 } /* rlcDlUdxMeasReq */
612
613 /**
614 @brief 
615 This function processes L2 Measurement stop request received from the layer manager.
616 After receving this request, RLC stops L2 Measurement
617  *  @param[in] pst      post structure
618  *  @param[in] measType meas Type 
619  *  @return S16
620  *      -# Success : ROK
621  *      -# Failure : RFAILED
622 */
623
624 S16 rlcDlUdxL2MeasStopReq
625 (
626 Pst            *pst,
627 uint8_t         measType
628 )
629 {
630   /* S16 ret = ROK;*/
631    RlcL2MeasEvtCb *measEvtCb = NULLP;
632    uint16_t        cntr;
633    uint8_t         status = ROK;
634 /*   RlcL2MeasCfmEvt          measCfmEvt;  */
635    volatile uint32_t     startTime = 0;
636    RlcCb     *tRlcCb=NULLP;
637    
638    /*starting Task*/
639    SStartTask(&startTime, PID_RLC_MEAS_STOP);
640
641    tRlcCb =  RLC_GET_RLCCB(pst->dstInst);
642 /*   memset(&measCfmEvt, 0, sizeof(RlcL2MeasCfmEvt)); */
643    /* reset the counters for the measurement type passed */
644    for(cntr = 0; cntr < LKW_MAX_L2MEAS; cntr++)
645    {
646       measEvtCb = &(tRlcCb->u.dlCb->rlcL2Cb.rlcL2EvtCb[cntr]);
647       if(measEvtCb->measCb.measType & measType)
648       {
649          rlcUtlResetDlL2MeasInRlcRb(tRlcCb, &measEvtCb->measCb, measType);
650
651       }
652    }
653
654    /* switch off the measurements for the type passed */
655    for(cntr = 0; cntr < LKW_MAX_QCI; cntr++)
656    {
657       tRlcCb->u.dlCb->rlcL2Cb.measOn[cntr] &= ~measType;
658    }
659    
660    status = LCM_PRIM_OK;
661    /* Stop confirm is removed as UL thread is already sending it */
662    
663    /*stopping Task*/
664    SStopTask(startTime, PID_RLC_MEAS_STOP);
665
666    return ROK;
667 }
668 /**
669 @brief 
670 This function processes L2 Measurement Send request received from the layer manager.
671 After receving this request, RLC sends L2 Measurement
672  *  @param[in] pst      post structure
673  *  @param[in] measType meas Type 
674  *  @return S16
675  *      -# Success : ROK
676  *      -# Failure : RFAILED
677 */
678
679 S16 rlcDlUdxL2MeasSendReq
680 (
681 Pst            *pst,
682 uint8_t         measType
683 )
684 {
685    RlcL2MeasEvtCb *measEvtCb;
686    uint16_t            cntr;
687    volatile uint32_t     startTime = 0;
688    RlcCb     *tRlcCb;
689
690    tRlcCb =  RLC_GET_RLCCB(pst->dstInst);
691    for(cntr = 0; cntr < LKW_MAX_L2MEAS; cntr++)
692    {
693       measEvtCb = &(tRlcCb->u.dlCb->rlcL2Cb.rlcL2EvtCb[cntr]);
694       if(measEvtCb->measCb.measType & measType)
695       {
696          /*starting Task*/
697          SStartTask(&startTime, PID_RLC_MEAS_REPORT);
698
699          rlcUtlSndDlL2MeasCfm(tRlcCb, measEvtCb);
700
701          /*stopping Task*/
702          SStopTask(startTime, PID_RLC_MEAS_REPORT);
703       }
704    }
705
706    return ROK;
707 }
708 #endif /* LTE_L2_MEAS */
709
710 #ifdef __cplusplus
711 }
712 #endif /* __cplusplus */
713
714 \f
715 /**********************************************************************
716          End of file
717 **********************************************************************/