Replaced old SSI function with new macros jira id - ODUHIGH-212
[o-du/l2.git] / src / cm / kwu.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:    KWU Interface
22     
23         Type:    C file
24   
25         Desc:    This file Contains the packing and unpacking functions for
26                  KWU Interface
27  
28         File:    kwu.c
29   
30 *********************************************************************21*/
31 \f
32 /* header include files (.h) */
33 #include "common_def.h"
34 #ifdef TENB_SPLIT_ARCH
35 #include "ss_queue.h"
36 #include "ss_task.h"
37 #include "ss_msg.h"
38 #endif
39 #include "kwu.h"           /* KWU defines */
40
41 /* extern (.x) include files */
42 #ifdef TENB_SPLIT_ARCH
43 #include "ss_queue.x"
44 #include "ss_task.x"
45 #include "ss_msg.x"
46 #endif
47 #ifdef SS_RBUF
48 #include "ss_rbuf.h"
49 #include "ss_rbuf.x"
50 #endif /*SS_RBUF*/
51 #include "kwu.x"           /* KWU */
52
53 #ifdef LCKWU
54 \f
55 /****************************************************************************
56  *                      Packing Functions
57  ***************************************************************************/
58 #ifdef ANSI
59 PUBLIC S16 cmPkKwuBndReq
60 (
61 Pst * pst,
62 SuId suId,
63 SpId spId
64 )
65 #else
66 PUBLIC S16 cmPkKwuBndReq(pst, suId, spId)
67 Pst * pst;
68 SuId suId;
69 SpId spId;
70 #endif
71 {
72    S16    ret1;
73    Buffer *mBuf;
74
75    TRC3(cmPkKwuBndReq)
76
77    mBuf = NULLP;
78
79    if((ret1 = SGetMsg(pst->region, pst->pool, &mBuf)) != ROK)
80    {
81 #if (ERRCLASS & ERRCLS_ADD_RES)
82       if(ret1 != ROK)
83       {
84          SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
85                __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
86                (ErrVal)EKWU001, (ErrVal)0, "SGetMsg() failed");
87       }
88 #endif /*  ERRCLASS & ERRCLS_ADD_RES  */
89       return (ret1);
90    }
91    CMCHKPKLOG(SPkS16, spId, mBuf, EKWU002, pst);
92    CMCHKPKLOG(SPkS16, suId, mBuf, EKWU003, pst);
93    pst->event = (Event) KWU_EVT_BND_REQ;
94    return (SPstTsk(pst,mBuf));
95 }
96
97 \f
98 #ifdef ANSI
99 PUBLIC S16 cmPkKwuBndCfm
100 (
101 Pst * pst,
102 SuId suId,
103 U8 status
104 )
105 #else
106 PUBLIC S16 cmPkKwuBndCfm(pst, suId, status)
107 Pst * pst;
108 SuId suId;
109 U8 status;
110 #endif
111 {
112    S16    ret1;
113    Buffer *mBuf;
114
115    TRC3(cmPkKwuBndCfm)
116
117    mBuf = NULLP;
118
119    if((ret1 = SGetMsg(pst->region, pst->pool, &mBuf)) != ROK)
120    {
121 #if (ERRCLASS & ERRCLS_ADD_RES)
122       if(ret1 != ROK)
123       {
124          SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
125                __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
126                (ErrVal)EKWU004, (ErrVal)0, "SGetMsg() failed");
127       }
128 #endif /*  ERRCLASS & ERRCLS_ADD_RES  */
129       return (ret1);
130    }
131
132    CMCHKPKLOG(oduUnpackUInt8, status, mBuf, EKWU005, pst);
133    CMCHKPKLOG(SPkS16, suId, mBuf, EKWU006, pst);
134    pst->event = (Event) KWU_EVT_BND_CFM;
135    return (SPstTsk(pst,mBuf));
136 }
137
138 \f
139 #ifdef ANSI
140 PUBLIC S16 cmPkKwuUbndReq
141 (
142 Pst * pst,
143 SuId suId,
144 Reason reason
145 )
146 #else
147 PUBLIC S16 cmPkKwuUbndReq(pst, suId, reason)
148 Pst * pst;
149 SuId suId;
150 Reason reason;
151 #endif
152 {
153    S16 ret1;
154    Buffer *mBuf;
155
156    TRC3(cmPkKwuUbndReq)
157
158    mBuf = NULLP;
159
160    if((ret1 = SGetMsg(pst->region, pst->pool, &mBuf)) != ROK)
161    {
162 #if (ERRCLASS & ERRCLS_ADD_RES)
163       if(ret1 != ROK)
164       {
165          SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
166                __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
167                (ErrVal)EKWU007, (ErrVal)0, "SGetMsg() failed");
168       }
169 #endif /*  ERRCLASS & ERRCLS_ADD_RES  */
170       return (ret1);
171    }
172    CMCHKPKLOG(SPkS16, reason, mBuf, EKWU008, pst);
173    CMCHKPKLOG(SPkS16, suId, mBuf, EKWU009, pst);
174
175    pst->event = (Event) KWU_EVT_UBND_REQ;
176    return (SPstTsk(pst,mBuf));
177 } /* cmPkKwuUbndReq */
178
179 #ifdef ANSI
180 uint8_t cmPkKwuDatReqInfo
181 (
182 KwuDatReqInfo *param,
183 Buffer *mBuf
184 )
185 #else
186 uint8_t cmPkKwuDatReqInfo(param, mBuf)
187 KwuDatReqInfo *param;
188 Buffer *mBuf;
189 #endif
190 {
191
192    TRC3(cmPkKwuDatReqInfo);
193
194 #ifdef CCPU_OPT
195    switch(param->lcType) {
196       case CM_LTE_LCH_CCCH:
197          CMCHKPK(cmPkLteRnti, param->tm.rnti, mBuf);
198          break;
199       case CM_LTE_LCH_BCCH:
200       case  CM_LTE_LCH_PCCH:
201          CMCHKPK(cmPkLteTimingInfo, &param->tm.tmg, mBuf);
202 #ifdef EMTC_ENABLE
203          CMCHKPK(oduUnpackUInt8, param->emtcDiReason,mBuf);
204          CMCHKPK(oduUnpackUInt8, param->pnb,mBuf);
205 #endif
206          break;
207       case CM_LTE_LCH_DTCH:
208       case CM_LTE_LCH_DCCH:
209          break;
210       default :
211          return RFAILED;
212    }
213    CMCHKPK(cmPkLteLcType, param->lcType, mBuf);
214
215 #endif
216    CMCHKPK(oduUnpackUInt32, param->sduId, mBuf);
217    CMCHKPK(cmPkLteRlcId, &param->rlcId, mBuf);
218    return ROK;
219 } /* cmPkKwuDatReqInfo */
220
221 \f
222 #ifdef ANSI
223 uint8_t cmPkKwuDatReq
224 (
225 Pst * pst,
226 KwuDatReqInfo* datReq,
227 Buffer * mBuf
228 )
229 #else
230 uint8_t cmPkKwuDatReq(pst, datReq, mBuf)
231 Pst * pst;
232 KwuDatReqInfo* datReq;
233 Buffer * mBuf;
234 #endif
235 {
236 #ifdef LCKWU
237 #if (ERRCLASS & ERRCLS_ADD_RES)
238 #endif
239 #endif /* LCKWU */
240    S16 ret1 = ROK;
241 #ifndef SS_RBUF
242    KwuDatReqInfo* datReqInfo;
243 #endif
244     TRC3(cmPkKwuDatReq)
245 #ifndef SS_RBUF
246    switch(pst->selector)
247    {
248      case ODU_SELECTOR_LWLC:
249         {
250            if(pst->srcEnt == ENTDUAPP)
251            {
252              /* When the Selector is LWLC, we need to allocate memory, copy
253               * the contents and pass the pointer of the allocated memory. The
254               * subsequent free would be done during the Unpack function of the
255               * primitive. */
256             if((ret1 = SGetStaticBuffer(pst->region, pst->pool, (Data **)&datReqInfo,
257                         sizeof(KwuDatReqInfo),SS_SHARABLE_MEMORY)) != ROK)
258             {
259 #if (ERRCLASS & ERRCLS_ADD_RES)
260                if(ret1 != ROK)
261                {
262                   SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
263                         __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
264                         (ErrVal)EKWU028, (ErrVal)0, "SGetMsg() failed");
265                }
266 #endif /*  ERRCLASS & ERRCLS_ADD_RES  */
267                return (ret1);
268             }
269             cmMemcpy((U8*)datReqInfo,(U8*)datReq,sizeof(KwuDatReqInfo));
270             CMCHKPK(oduPackPointer,(PTR)datReqInfo, mBuf);
271            }
272            else
273            {
274             CMCHKPK(oduPackPointer,(PTR)datReq, mBuf);
275            }
276         }
277         break;
278      case ODU_SELECTOR_LC:
279         {
280 #if (ERRCLASS & ERRCLS_ADD_RES)
281            ret1 = cmPkKwuDatReqInfo( (datReq), mBuf);
282            if(ret1 != ROK)
283            {
284               SPutMsg(mBuf);
285               SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
286                     __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
287                     (ErrVal)EKWU010, (ErrVal)ret1, "Packing failure");
288               return ( ret1 );
289            }
290 #else
291            cmPkKwuDatReqInfo( (datReq), mBuf);
292 #endif /*  ERRCLASS & ERRCLS_ADD_RES  */
293            if(pst->srcEnt == ENTNH)
294            {
295               if (SPutStaticBuffer(pst->region, pst->pool, (Data *)datReq,
296                        sizeof(KwuDatReqInfo),SS_SHARABLE_MEMORY) != ROK)
297               {
298                  SPutMsg(mBuf);
299                  return RFAILED;
300               }
301            }
302         }
303         break;
304      default:
305           SPutMsg(mBuf);
306 #if (ERRCLASS & ERRCLS_ADD_RES)
307           SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
308                __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
309                (ErrVal)ERRKWU, (ErrVal)ret1, "pst->selector is invalid\n");
310 #endif /*  ERRCLASS & ERRCLS_ADD_RES  */
311           return RFAILED;
312    }
313
314 #ifdef L2_L3_SPLIT
315     if(datReq->rlcId.rbType == CM_LTE_SRB)
316     {
317        pst->event = (Event) KWU_EVT_CPLANE_DAT_REQ;
318     }
319     else
320     {
321        pst->event = (Event) KWU_EVT_UPLANE_DAT_REQ;
322     }
323 #else
324     pst->event = (Event) KWU_EVT_DAT_REQ;
325 #endif
326     return (SPstTsk(pst,mBuf));
327 #else
328    if (pst->srcEnt == ENTPJ)
329    {
330       Void *elem = NULLP;
331       KwuDatReqDetl *kwuDatReqDetl = NULLP;
332       elem = SRngGetWIndx(SS_RNG_BUF_DLPDCP_TO_DLRLC);
333       if (NULLP != elem)
334       {
335          kwuDatReqDetl = (KwuDatReqDetl *) elem;
336          kwuDatReqDetl->spId = spId;
337          kwuDatReqDetl->lcType = datReq->lcType;
338          kwuDatReqDetl->sduId = datReq->sduId;
339          kwuDatReqDetl->rlcId = datReq->rlcId;
340          kwuDatReqDetl->mBuf = mBuf;
341          SRngIncrWIndx(SS_RNG_BUF_DLPDCP_TO_DLRLC);
342          SsRngInfoTbl[SS_RNG_BUF_DLPDCP_TO_DLRLC].pktRate++;
343          ret1 = ROK;
344       }
345       else
346       {
347          SsRngInfoTbl[SS_RNG_BUF_DLPDCP_TO_DLRLC].pktDrop++;
348          SPutMsg(mBuf);
349          ret1 = RFAILED;
350       }
351    }
352    else
353    {
354       switch(pst->selector)
355       {
356 #ifdef LCKWU
357          case ODU_SELECTOR_LC:
358             {
359                ret1 = cmPkKwuDatReqInfo( (datReq), mBuf);
360 #if (ERRCLASS & ERRCLS_ADD_RES)
361                if(ret1 != ROK)
362                {
363                   SPutMsg(mBuf);
364                   SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
365                         __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
366                         (ErrVal)EKWU010, (ErrVal)ret1, "Packing failure");
367                   return ( ret1 );
368                }
369 #endif /*  ERRCLASS & ERRCLS_ADD_RES  */
370             }
371             break;
372          case ODU_SELECTOR_LWLC:
373             {
374                CMCHKPK(oduPackPointer,(PTR)datReq, mBuf);
375             }
376             break;
377 #endif /* LCKWU */
378       }
379
380       CMCHKPKLOG(SPkS16, spId, mBuf, EKWU011, pst);
381       pst->event = (Event) KWU_EVT_DAT_REQ;
382       ret1 = SPstTsk(pst,mBuf);
383       if(pst->selector == ODU_SELECTOR_LC)
384       {
385          if (SPutStaticBuffer(pst->region, pst->pool, (Data *)datReq,
386                   sizeof(KwuDatReqInfo),SS_SHARABLE_MEMORY) != ROK)
387          {
388             SPutMsg(mBuf);
389             return RFAILED;
390          }
391       }
392    }
393    return (ret1);
394 #endif
395 } /* cmPkKwuDatReq */
396
397 \f
398 #ifdef ANSI
399 uint8_t cmPkKwuDatIndInfo
400 (
401 KwuDatIndInfo *param,
402 Buffer *mBuf
403 )
404 #else
405 uint8_t cmPkKwuDatIndInfo(param, mBuf)
406 KwuDatIndInfo *param;
407 Buffer *mBuf;
408 #endif
409 {
410    TRC3(cmPkKwuDatIndInfo);
411
412    CMCHKPK(oduUnpackUInt8, param->isOutOfSeq, mBuf);
413 #ifdef CCPU_OPT
414    CMCHKPK(cmPkLteRnti, param->tCrnti, mBuf);
415 #endif
416    CMCHKPK(cmPkLteRlcId, &param->rlcId, mBuf);
417    return ROK;
418 }
419
420 \f
421 #ifdef ANSI
422 uint8_t cmPkKwuDatInd
423 (
424 Pst * pst,
425 KwuDatIndInfo* datInd,
426 Buffer * mBuf
427 )
428 #else
429 uint8_t cmPkKwuDatInd(pst, datInd, mBuf)
430 Pst * pst;
431 KwuDatIndInfo* datInd;
432 Buffer * mBuf;
433 #endif
434 {
435 #ifdef LCKWU
436     S16 ret1 = ROK;
437 #endif /* LCKWU */
438 #ifdef TENB_SPLIT_ARCH
439 #ifdef SS_LOCKLESS_MEMORY
440     SsMsgInfo   *mInfo; 
441 #endif
442 #endif
443     KwuDatIndInfo *datIndInfo = NULLP;
444
445     TRC3(cmPkKwuDatInd)
446
447 #ifdef TENB_SPLIT_ARCH
448     /* SSI_CHANGES: */
449 #ifdef SS_LOCKLESS_MEMORY
450     mInfo = (SsMsgInfo *)mBuf->b_rptr;
451     mInfo->region = pst->region;
452 #endif /* SS_LOCKLESS_MEMORY */
453 #endif
454
455     switch(pst->selector)
456     {
457        case ODU_SELECTOR_LWLC:
458           {
459              /* When the Selector is LWLC, we need to allocate memory, copy
460               * the contents and pass the pointer of the allocated memory. The
461               * subsequent free would be done during the Unpack function of the
462               * primitive. */
463             if((ret1 = SGetStaticBuffer(pst->region, pst->pool, (Data **)&datIndInfo,
464                         sizeof(KwuDatIndInfo),SS_SHARABLE_MEMORY)) != ROK)
465             {
466 #if (ERRCLASS & ERRCLS_ADD_RES)
467                if(ret1 != ROK)
468                {
469                   SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
470                         __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
471                         (ErrVal)EKWU028, (ErrVal)0, "SGetMsg() failed");
472                }
473 #endif /*  ERRCLASS & ERRCLS_ADD_RES  */
474                return (ret1);
475             }
476
477             cmMemcpy((U8*)datIndInfo,(U8*)datInd,sizeof(KwuDatIndInfo));
478             CMCHKPK(oduPackPointer,(PTR)datIndInfo, mBuf);
479           }
480           break;
481        case ODU_SELECTOR_LC:
482           {
483 #if (ERRCLASS & ERRCLS_ADD_RES)
484              ret1 = cmPkKwuDatIndInfo( (datInd), mBuf);
485              if(ret1 != ROK)
486              {
487                 SPutMsg(mBuf);
488                 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
489                       __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
490                       (ErrVal)EKWU012, (ErrVal)ret1, "Packing failure");
491                 return ( ret1 );
492              }
493 #else
494              cmPkKwuDatIndInfo( (datInd), mBuf);
495 #endif /*  ERRCLASS & ERRCLS_ADD_RES  */
496           }
497           break;
498        default:
499           SPutMsg(mBuf);
500 #if (ERRCLASS & ERRCLS_ADD_RES)
501           SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
502                __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
503                (ErrVal)ERRKWU, (ErrVal)ret1, "pst->selector is invalid\n");
504 #endif /*  ERRCLASS & ERRCLS_ADD_RES  */
505           return RFAILED;
506     }
507
508     pst->event = (Event) KWU_EVT_DAT_IND;
509
510     return (SPstTsk(pst,mBuf));
511 } /* cmPkKwuDatInd */
512
513 \f
514 #ifdef ANSI
515 PUBLIC S16 cmPkKwuDatCfmInfo
516 (
517 KwuDatCfmInfo *param,
518 Buffer *mBuf
519 )
520 #else
521 PUBLIC S16 cmPkKwuDatCfmInfo(param, mBuf)
522 KwuDatCfmInfo *param;
523 Buffer *mBuf;
524 #endif
525 {
526    register U32 iter;
527
528    TRC3(cmPkKwuDatCfmInfo);
529    for(iter = 0; iter < param->numSduIds; iter++)
530    {
531       CMCHKPK(oduUnpackUInt32, param->sduIds[iter], mBuf);
532    }
533    CMCHKPK(oduUnpackUInt32, param->numSduIds, mBuf);
534    CMCHKPK(cmPkLteRlcId, &param->rlcId, mBuf);
535    return ROK;
536 } /* cmPkKwuDatCfmInfo */
537
538 \f
539 #ifdef ANSI
540 PUBLIC S16 cmPkKwuDatCfm
541 (
542 Pst * pst,
543 SuId suId,
544 KwuDatCfmInfo* datCfm
545 )
546 #else
547 PUBLIC S16 cmPkKwuDatCfm(pst, suId, datCfm)
548 Pst * pst;
549 SuId suId;
550 KwuDatCfmInfo* datCfm;
551 #endif
552 {
553 #if (ERRCLASS & ERRCLS_ADD_RES)
554    S16 ret1= ROK;
555 #endif 
556    Buffer *mBuf;
557
558    TRC3(cmPkKwuDatCfm)
559
560    mBuf = NULLP;
561
562    if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
563       return RFAILED;
564    }
565
566    switch(pst->selector)
567    {
568       case ODU_SELECTOR_LWLC:
569          {
570             CMCHKPK(oduPackPointer,(PTR)datCfm, mBuf);
571          }
572          break;
573       case ODU_SELECTOR_LC:
574          {
575 #if (ERRCLASS & ERRCLS_ADD_RES)
576             ret1 = cmPkKwuDatCfmInfo( (datCfm), mBuf);
577             if(ret1 != ROK)
578             {
579                SPutMsg(mBuf);
580                SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
581                      __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
582                      (ErrVal)EKWU014, (ErrVal)ret1, "Packing failure");
583                return ( ret1 );
584             }
585 #else
586             cmPkKwuDatCfmInfo( (datCfm), mBuf);
587 #endif /*  ERRCLASS & ERRCLS_ADD_RES  */
588             if (SPutStaticBuffer(pst->region, pst->pool, (Data *)datCfm,
589                      sizeof(KwuDatCfmInfo),SS_SHARABLE_MEMORY) != ROK)
590             {
591                SPutMsg(mBuf);
592                return RFAILED;
593             }
594          }
595          break;
596       default:
597           SPutMsg(mBuf);
598 #if (ERRCLASS & ERRCLS_ADD_RES)
599           SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
600                __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
601                (ErrVal)ERRKWU, (ErrVal)ret1, "pst->selector is invalid\n");
602 #endif /*  ERRCLASS & ERRCLS_ADD_RES  */
603           return RFAILED;
604    }
605
606     CMCHKPKLOG(SPkS16, suId, mBuf, EKWU015, pst);
607     pst->event = (Event) KWU_EVT_DAT_CFM;
608
609     return (SPstTsk(pst,mBuf));
610 } /* cmPkKwuDatCfm */
611
612 \f
613 #ifdef ANSI
614 PUBLIC S16 cmPkKwuDiscSduReq
615 (
616 Pst * pst,
617 SpId spId,
618 KwuDiscSduInfo* discSdu
619 )
620 #else
621 PUBLIC S16 cmPkKwuDiscSduReq(pst, spId, discSdu)
622 Pst * pst;
623 SpId spId;
624 KwuDiscSduInfo* discSdu;
625 #endif
626 {
627 #ifdef LCKWU
628    S16 ret1;
629 #endif /* LCKWU */
630    Buffer *mBuf;
631    KwuDiscSduInfo* discSduInfo = NULLP;
632
633    TRC3(cmPkKwuDiscSduReq)
634    mBuf = NULLP;
635
636    if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
637       return RFAILED;
638    }
639
640    switch(pst->selector)
641    {
642       case ODU_SELECTOR_LWLC:
643          {
644             /* When the Selector is LWLC, we need to allocate memory, copy
645              * the contents and pass the pointer of the allocated memory. The
646              * subsequent free would be done during the Unpack function of the
647              * primitive. */
648            if((ret1 = SGetStaticBuffer(pst->region, pst->pool, (Data **)&discSduInfo,
649                        sizeof(KwuDiscSduInfo),SS_SHARABLE_MEMORY)) != ROK)
650            {
651 #if (ERRCLASS & ERRCLS_ADD_RES)
652               if(ret1 != ROK)
653               {
654                  SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
655                        __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
656                         (ErrVal)EKWU028, (ErrVal)0, "SGetMsg() failed");
657               }
658 #endif /*  ERRCLASS & ERRCLS_ADD_RES  */
659               return (ret1);
660            }
661             
662            cmMemcpy((U8*)discSduInfo,(U8*)discSdu,sizeof(KwuDiscSduInfo));
663            CMCHKPK(oduPackPointer,(PTR)discSduInfo, mBuf);
664          }
665          break;
666       case ODU_SELECTOR_LC:
667          {
668 #if (ERRCLASS & ERRCLS_ADD_RES)
669             ret1 = cmPkKwuDiscSduInfo( (discSdu), mBuf);
670             if(ret1 != ROK)
671             {
672                SPutMsg(mBuf);
673                SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
674                      __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
675                      (ErrVal)EKWU016, (ErrVal)ret1, "Packing failure");
676                return ( ret1 );
677             }
678 #else
679             cmPkKwuDiscSduInfo( (discSdu), mBuf);
680 #endif /*  ERRCLASS & ERRCLS_ADD_RES  */
681              break;
682           }
683     }
684
685     CMCHKPKLOG(SPkS16, spId, mBuf, EKWU017, pst);
686     pst->event = (Event) KWU_EVT_DISC_SDU_REQ;
687
688     return (SPstTsk(pst,mBuf));
689 } /* cmPkKwuDiscSduReq */
690
691 \f
692 #ifdef ANSI
693 PUBLIC S16 cmPkKwuStaIndInfo
694 (
695 KwuStaIndInfo *param,
696 Buffer *mBuf
697 )
698 #else
699 PUBLIC S16 cmPkKwuStaIndInfo(param, mBuf)
700 KwuStaIndInfo *param;
701 Buffer *mBuf;
702 #endif
703 {
704    S16 i;
705
706    TRC3(cmPkKwuStaIndInfo);
707
708    for (i = (param->numSdu - 1); i >= 0; i--)
709    {
710       CMCHKPK(oduUnpackUInt32, param->sduId[(U16)i], mBuf);
711    }
712    CMCHKPK(oduUnpackUInt32, param->numSdu, mBuf);
713    CMCHKPK(cmPkLteRlcId, &param->rlcId, mBuf);
714    return ROK;
715 }
716
717 #ifdef ANSI
718 PUBLIC S16 cmPkKwuFlowCntrlIndInfo
719 (
720 KwuFlowCntrlIndInfo *param,
721 Buffer              *mBuf
722 )
723 #else
724 PUBLIC S16 cmPkKwuFlowCntrlIndInfo(param, mBuf)
725 KwuFlowCntrlIndInfo  *param;
726 Buffer               *mBuf;
727 #endif
728 {
729    TRC3(cmPkKwuFlowCntrlIndInfo);
730
731    CMCHKPK(oduUnpackUInt32, param->pktAdmitCnt, mBuf);   
732    CMCHKPK(cmPkLteRlcId, &param->rlcId, mBuf);
733
734    return ROK;
735 } /* cmPkKwuFlowCntrlIndInfo */
736
737 #ifdef ANSI
738 PUBLIC S16 cmUnpkKwuFlowCntrlIndInfo
739 (
740 KwuFlowCntrlIndInfo *param,
741 Buffer              *mBuf
742 )
743 #else
744 PUBLIC S16 cmUnpkKwuFlowCntrlIndInfo(param, mBuf)
745 KwuFlowCntrlIndInfo  *param;
746 Buffer               *mBuf;
747 #endif
748 {
749    TRC3(cmUnpkKwuFlowCntrlIndInfo);
750    
751    CMCHKUNPK(cmUnpkLteRlcId, &param->rlcId, mBuf);
752    CMCHKUNPK(oduPackUInt32, &param->pktAdmitCnt, mBuf);
753   
754    return ROK;
755 } /* cmUnpkKwuFlowCntrlIndInfo */
756
757 \f
758 #ifdef ANSI
759 PUBLIC S16 cmPkKwuStaInd
760 (
761 Pst * pst,
762 SuId suId,
763 KwuStaIndInfo* staInd
764 )
765 #else
766 PUBLIC S16 cmPkKwuStaInd(pst, suId, staInd)
767 Pst * pst;
768 SuId suId;
769 KwuStaIndInfo* staInd;
770 #endif
771 {
772 #ifdef LCKWU
773 #if (ERRCLASS & ERRCLS_ADD_RES)
774    S16 ret1 = ROK;
775 #endif
776 #endif /* LCKWU */
777    Buffer *mBuf;
778
779    TRC3(cmPkKwuStaInd)
780
781    mBuf = NULLP;
782
783    if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
784       return RFAILED;
785    }
786
787     switch(pst->selector)
788     {
789        case ODU_SELECTOR_LWLC:
790           {
791              CMCHKPK(oduPackPointer,(PTR) staInd, mBuf);
792           }
793           break;
794        case ODU_SELECTOR_LC:
795           {
796 #if (ERRCLASS & ERRCLS_ADD_RES)
797              ret1 = cmPkKwuStaIndInfo( (staInd), mBuf);
798              if(ret1 != ROK)
799              {
800                 SPutMsg(mBuf);
801                 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
802                       __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
803                       (ErrVal)EKWU018, (ErrVal)ret1, "Packing failure");
804                 return ( ret1 );
805              }
806 #else
807              cmPkKwuStaIndInfo( (staInd), mBuf);
808 #endif /*  ERRCLASS & ERRCLS_ADD_RES  */
809              if (SPutStaticBuffer(pst->region, pst->pool, (Data *)staInd,
810                       sizeof(KwuStaIndInfo),SS_SHARABLE_MEMORY) != ROK)
811              {
812                 SPutMsg(mBuf);
813                 return RFAILED;
814              }
815           }
816           break;
817        default:
818           SPutMsg(mBuf);
819 #if (ERRCLASS & ERRCLS_ADD_RES)
820           SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
821                __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
822                (ErrVal)ERRKWU, (ErrVal)ret1, "pst->selector is invalid\n");
823 #endif
824           return RFAILED;
825     }
826
827     CMCHKPKLOG(SPkS16, suId, mBuf, EKWU019, pst);
828     pst->event = (Event) KWU_EVT_STA_IND;
829
830     return (SPstTsk(pst,mBuf));
831 } /* cmPkKwuStaInd */
832
833 \f
834 #ifdef ANSI
835 PUBLIC S16 cmPkKwuReEstCmpInd
836 (
837 Pst * pst,
838 SuId suId,
839 CmLteRlcId rlcId
840 )
841 #else
842 PUBLIC S16 cmPkKwuReEstCmpInd(pst, suId, rlcId)
843 Pst * pst;
844 SuId suId;
845 CmLteRlcId rlcId;
846 #endif
847 {
848 #ifdef LCKWU
849 #if (ERRCLASS & ERRCLS_ADD_RES)
850    S16 ret1;
851 #endif
852 #endif /* LCKWU */
853    Buffer *mBuf;
854
855    TRC3(cmPkKwuReEstCmpInd)
856
857    mBuf = NULLP;
858
859    if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
860       return RFAILED;
861    }
862
863     switch(pst->selector)
864     {
865 #ifdef LCKWU
866        case ODU_SELECTOR_LC:
867           {
868 #if (ERRCLASS & ERRCLS_ADD_RES)
869              ret1 = cmPkLteRlcId( &rlcId, mBuf);
870              if(ret1 != ROK)
871              {
872                 SPutMsg(mBuf);
873                 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
874                       __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
875                       (ErrVal)EKWU018, (ErrVal)ret1, "Packing failure");
876                 return ( ret1 );
877              }
878 #else
879              cmPkLteRlcId( &rlcId, mBuf);
880 #endif /*  ERRCLASS & ERRCLS_ADD_RES  */
881              break;
882           }
883 #endif /* LCKWU */
884     }
885
886     CMCHKPKLOG(SPkS16, suId, mBuf, EKWU019, pst);
887     pst->event = (Event) KWU_EVT_REEST_CMP_IND;
888
889     return (SPstTsk(pst,mBuf));
890 } /* cmPkKwuReEstCmpInd */
891
892 /* kwu_c_001.main_3 added support for L2 Measurement */
893 #ifdef ANSI
894 PUBLIC S16 cmPkKwuDiscSduCfm
895 (
896 Pst            *pst,
897 SpId           spId,
898 KwuDiscSduInfo *discCfmSdu
899 )
900 #else
901 PUBLIC S16 cmPkKwuDiscSduCfm(pst, spId, discCfmSdu)
902 Pst            *pst;
903 SpId           spId;
904 KwuDiscSduInfo *discCfmSdu;
905 #endif
906 {
907 #if (ERRCLASS & ERRCLS_ADD_RES)
908    S16 ret1 = ROK;
909 #endif
910    Buffer *mBuf;
911
912    TRC3(cmPkKwuDiscSduCfm)
913
914    mBuf = NULLP;
915
916    if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
917       return RFAILED;
918    }
919
920    switch(pst->selector)
921    {
922       case ODU_SELECTOR_LWLC:
923          {
924             CMCHKPK(oduPackPointer,(PTR)discCfmSdu, mBuf);
925          }
926          break;
927       case ODU_SELECTOR_LC:
928          {
929 #if (ERRCLASS & ERRCLS_ADD_RES)
930             ret1 = cmPkKwuDiscSduInfo((discCfmSdu), mBuf);
931             if(ret1 != ROK)
932             {
933                SPutMsg(mBuf);
934                SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
935                      __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
936                      (ErrVal)ERRKWU, (ErrVal)ret1, "Packing failure");
937                return ( ret1 );
938             }
939 #else
940             cmPkKwuDiscSduInfo((discCfmSdu), mBuf);
941 #endif /*  ERRCLASS & ERRCLS_ADD_RES  */
942             if (SPutStaticBuffer(pst->region, pst->pool, (Data *)discCfmSdu,
943                      sizeof(KwuDiscSduInfo),SS_SHARABLE_MEMORY) != ROK)
944             {
945                SPutMsg(mBuf);
946                return RFAILED;
947             }
948          }
949          break;
950       default:
951          SPutMsg(mBuf);
952 #if (ERRCLASS & ERRCLS_ADD_RES)
953          SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
954                __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
955                (ErrVal)ERRKWU, (ErrVal)ret1, "pst->selector is invalid\n");
956 #endif
957           return RFAILED;
958    }
959
960    CMCHKPKLOG(SPkS16, spId, mBuf, ERRKWU, pst);
961    pst->event = (Event) KWU_EVT_DISC_SDU_CFM;
962
963    return (SPstTsk(pst,mBuf));
964 } /* cmPkKwuDiscSduCfm */
965 \f
966 #ifdef ANSI
967 PUBLIC S16 cmPkKwuFlowCntrlInd
968 (
969 Pst            *pst,
970 SuId           suId,
971 KwuFlowCntrlIndInfo *flowCntrlIndInfo
972 )
973 #else
974 PUBLIC S16 cmPkKwuFlowCntrlInd(pst, suId, flowCntrlIndInfo)
975 Pst            *pst;
976 SuId           suId;
977 KwuFlowCntrlIndInfo *flowCntrlIndInfo;
978 #endif
979 {
980    Buffer *mBuf;
981
982    TRC3(cmPkKwuFlowCntrlInd)
983
984    mBuf = NULLP;
985
986    if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) 
987    {
988       SPutStaticBuffer(pst->region, 
989                pst->pool, 
990                (Data *)flowCntrlIndInfo,
991                sizeof(KwuFlowCntrlIndInfo),0);
992       return RFAILED;
993    }
994 #ifdef LCKWU
995    switch(pst->selector)
996    {
997       case ODU_SELECTOR_LC:
998       {
999          cmPkKwuFlowCntrlIndInfo((flowCntrlIndInfo), mBuf);
1000
1001          if (SPutStaticBuffer(pst->region, 
1002                       pst->pool, 
1003                       (Data *)flowCntrlIndInfo,
1004                       sizeof(KwuFlowCntrlIndInfo),0) != ROK)
1005          {
1006             SPutMsg(mBuf);
1007             return RFAILED;
1008          }
1009       }
1010       break;
1011       
1012       case ODU_SELECTOR_LWLC:
1013       {
1014          CMCHKPK(oduPackPointer,(PTR) flowCntrlIndInfo, mBuf);
1015       }
1016       break;
1017    }
1018 #endif
1019
1020    CMCHKPKLOG(SPkS16, suId, mBuf, ERRKWU, pst);
1021    pst->event = (Event) KWU_EVT_FLOW_CNTRL_IND;
1022
1023    return (SPstTsk(pst,mBuf));
1024 } /* cmPkKwuFlowCntrlInd */
1025
1026 #ifdef LTE_L2_MEAS
1027 #ifdef ANSI
1028 PUBLIC S16 cmPkKwuDatAckInfo
1029 (
1030 KwuDatAckInfo *param,
1031 Buffer *mBuf
1032 )
1033 #else
1034 PUBLIC S16 cmPkKwuDatAckInfo(param, mBuf)
1035 KwuDatAckInfo *param;
1036 Buffer *mBuf;
1037 #endif
1038 {
1039    TRC3(cmPkKwuDatAckIndInfo);
1040
1041    CMCHKPK(cmPkLteRlcId, &param->rlcId, mBuf);
1042    CMCHKPK(oduUnpackUInt32, param->sduId, mBuf);
1043    return ROK;
1044 }
1045
1046 #ifdef ANSI
1047 PUBLIC S16 cmPkKwuDatAckInd
1048 (
1049 Pst * pst,
1050 SuId suId,
1051 KwuDatAckInfo* datInd
1052 )
1053 #else
1054 PUBLIC S16 cmPkKwuDatAckInd(pst, suId, datInd)
1055 Pst * pst;
1056 SuId suId;
1057 KwuDatAckInfo* datInd;
1058 #endif
1059 {
1060     S16 ret1;
1061
1062    Buffer *mBuf;
1063
1064    TRC3(cmPkKwuDatAckInd);
1065
1066    mBuf = NULLP;
1067
1068    if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
1069       return RFAILED;
1070    }
1071
1072    ret1 = cmPkKwuDatAckInfo( (datInd), mBuf);
1073 #if (ERRCLASS & ERRCLS_ADD_RES)
1074    if(ret1 != ROK)
1075    {
1076       SPutMsg(mBuf);
1077       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1078             __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1079             (ErrVal)ERRKWU, (ErrVal)ret1, "Packing failure");
1080       return ( ret1 );
1081    }
1082 #endif /*  ERRCLASS & ERRCLS_ADD_RES  */
1083    if (SPutStaticBuffer(pst->region, pst->pool, (Data *)datInd,
1084             sizeof(KwuDatAckInfo),SS_SHARABLE_MEMORY) != ROK)
1085    {
1086       SPutMsg(mBuf);
1087       return RFAILED;
1088    }
1089
1090    CMCHKPKLOG(SPkS16, suId, mBuf, ERRKWU, pst);
1091    pst->event = (Event) KWU_EVT_DAT_ACK_IND;
1092
1093    return (SPstTsk(pst,mBuf));
1094 } /* cmPkKwuDatAckInd */
1095 #endif /* LTE_L2_MEAS */
1096
1097 \f
1098 #ifdef ANSI
1099 PUBLIC S16 cmUnpkKwuBndReq
1100 (
1101 KwuBndReq func,
1102 Pst *pst,
1103 Buffer *mBuf
1104 )
1105 #else
1106 PUBLIC S16 cmUnpkKwuBndReq(func, pst, mBuf)
1107 KwuBndReq func;
1108 Pst *pst;
1109 Buffer *mBuf;
1110 #endif
1111 {
1112    SuId suId = 0;
1113    SpId spId = 0;
1114
1115    TRC3(cmUnpkKwuBndReq)
1116
1117    CMCHKUNPKLOG(SUnpkS16, &suId, mBuf, EKWU020, pst);
1118    CMCHKUNPKLOG(SUnpkS16, &spId, mBuf, EKWU021, pst);
1119    SPutMsg(mBuf);
1120
1121    return ((*func)(pst, suId, spId));
1122 }
1123
1124 \f
1125 #ifdef ANSI
1126 PUBLIC S16 cmUnpkKwuBndCfm
1127 (
1128 KwuBndCfm func,
1129 Pst *pst,
1130 Buffer *mBuf
1131 )
1132 #else
1133 PUBLIC S16 cmUnpkKwuBndCfm(func, pst, mBuf)
1134 KwuBndCfm func;
1135 Pst *pst;
1136 Buffer *mBuf;
1137 #endif
1138 {
1139    SuId suId = 0;
1140    U8 status = 0;
1141
1142    TRC3(cmUnpkKwuBndCfm)
1143
1144    CMCHKUNPKLOG(SUnpkS16, &suId, mBuf, EKWU022, pst);
1145    CMCHKUNPKLOG(oduPackUInt8, &status, mBuf, EKWU023, pst);
1146    SPutMsg(mBuf);
1147
1148    return ((*func)(pst, suId, status));
1149 }
1150
1151 \f
1152 #ifdef ANSI
1153 PUBLIC S16 cmUnpkKwuUbndReq
1154 (
1155 KwuUbndReq func,
1156 Pst *pst,
1157 Buffer *mBuf
1158 )
1159 #else
1160 PUBLIC S16 cmUnpkKwuUbndReq(func, pst, mBuf)
1161 KwuUbndReq func;
1162 Pst *pst;
1163 Buffer *mBuf;
1164 #endif
1165 {
1166    SpId spId = 0;
1167    Reason reason = 0;
1168    
1169    TRC3(cmUnpkKwuUbndReq)
1170
1171    CMCHKUNPKLOG(SUnpkS16, &spId, mBuf, EKWU024, pst);
1172    CMCHKUNPKLOG(SUnpkS16, &reason, mBuf, EKWU025, pst);
1173    SPutMsg(mBuf);
1174
1175    return ((*func)(pst, spId, reason));
1176 } /* cmUnpkKwuUbndReq */
1177
1178 \f
1179 #ifdef ANSI
1180 PUBLIC S16 cmUnpkKwuDatReqInfo
1181 (
1182 KwuDatReqInfo *param,
1183 Buffer *mBuf
1184 )
1185 #else
1186 PUBLIC S16 cmUnpkKwuDatReqInfo(param, mBuf)
1187 KwuDatReqInfo *param;
1188 Buffer *mBuf;
1189 #endif
1190 {
1191
1192    TRC3(cmUnpkKwuDatReqInfo);
1193
1194    CMCHKUNPK(cmUnpkLteRlcId, &param->rlcId, mBuf);
1195    CMCHKUNPK(oduPackUInt32, &param->sduId, mBuf);
1196
1197 #ifdef CCPU_OPT
1198    CMCHKUNPK(cmUnpkLteLcType, &param->lcType, mBuf);
1199    switch(param->lcType) {
1200       case CM_LTE_LCH_BCCH:
1201       case  CM_LTE_LCH_PCCH:
1202 #ifdef EMTC_ENABLE
1203          CMCHKUNPK(oduPackUInt8,&param->pnb , mBuf);
1204          CMCHKUNPK(oduPackUInt8,&param->emtcDiReason , mBuf);
1205 #endif         
1206          CMCHKUNPK(cmUnpkLteTimingInfo, &param->tm.tmg, mBuf);
1207
1208          break;
1209       case CM_LTE_LCH_CCCH:
1210          CMCHKUNPK(cmUnpkLteRnti, &param->tm.rnti, mBuf);
1211          break;
1212       case CM_LTE_LCH_DTCH:
1213       case CM_LTE_LCH_DCCH:
1214          break;
1215       default :
1216          return RFAILED;
1217    }
1218 #endif
1219    return ROK;
1220 }
1221
1222 \f
1223 #ifdef ANSI
1224 PUBLIC S16 cmUnpkKwuDatReq
1225 (
1226 KwuDatReq func,
1227 Pst *pst,
1228 Buffer *mBuf
1229 )
1230 #else
1231 PUBLIC S16 cmUnpkKwuDatReq(func, pst, mBuf)
1232 KwuDatReq func;
1233 Pst *pst;
1234 Buffer *mBuf;
1235 #endif
1236 {
1237 #if(ERRCLASS & ERRCLS_DEBUG)
1238    S16 ret1 = ROK; 
1239 #endif
1240    S16 retVal;
1241    KwuDatReqInfo *datReq = NULLP;
1242    KwuDatReqInfo datReqTmp;
1243
1244    TRC3(cmUnpkKwuDatReq)
1245
1246    switch(pst->selector)
1247    {
1248       case ODU_SELECTOR_LWLC:
1249          {
1250             CMCHKUNPK(oduUnpackPointer,(PTR *) &datReq, mBuf);
1251          }
1252          break;
1253       case ODU_SELECTOR_LC:
1254          {
1255             /* Allocate the memory statically  as there is no free 
1256              * in RLC */
1257             datReq = &datReqTmp;
1258             cmMemset((U8 *)datReq, 0, sizeof(KwuDatReqInfo));
1259 #if(ERRCLASS & ERRCLS_DEBUG)
1260             ret1 = cmUnpkKwuDatReqInfo( (datReq), mBuf);
1261             if(ret1 != ROK)
1262             {
1263                SPutMsg(mBuf);
1264                SLogError(pst->dstEnt, pst->dstInst, pst->dstProcId,
1265                      __FILE__, __LINE__, (ErrCls)ERRCLS_DEBUG,
1266                      (ErrVal)EKWU027, (ErrVal)ret1, "Unpacking failure");
1267                return ( ret1 );
1268             }
1269 #else
1270             cmUnpkKwuDatReqInfo( (datReq), mBuf);
1271 #endif /* ERRCLASS & ERRCLS_DEBUG */
1272          }
1273          break;
1274       default:
1275          SPutMsg(mBuf);
1276 #if (ERRCLASS & ERRCLS_ADD_RES)
1277          SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1278                __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1279                (ErrVal)ERRKWU, (ErrVal)ret1, "pst->selector is invalid\n");
1280 #endif
1281          return RFAILED;
1282    }
1283
1284    retVal = (*func)(pst, datReq, mBuf);
1285    /* If LWLC is configured, we need to
1286     * free the memory here. */
1287    if(pst->selector == ODU_SELECTOR_LWLC)
1288    {
1289       retVal = SPutStaticBuffer(pst->region, pst->pool, (Data *)datReq,
1290             sizeof(KwuDatReqInfo),SS_SHARABLE_MEMORY);
1291    }
1292    return (retVal);
1293 } /* cmUnpkKwuDatReq */
1294
1295 \f
1296 #ifdef ANSI
1297 uint8_t cmUnpkKwuDatIndInfo
1298 (
1299 KwuDatIndInfo *param,
1300 Buffer *mBuf
1301 )
1302 #else
1303 uint8_t cmUnpkKwuDatIndInfo(param, mBuf)
1304 KwuDatIndInfo *param;
1305 Buffer *mBuf;
1306 #endif
1307 {
1308    TRC3(cmUnpkKwuDatIndInfo);
1309
1310    CMCHKUNPK(cmUnpkLteRlcId, &param->rlcId, mBuf);
1311
1312 #ifdef CCPU_OPT
1313    CMCHKUNPK(cmUnpkLteRnti, &param->tCrnti, mBuf);
1314 #endif
1315    CMCHKUNPK(oduPackUInt8, &param->isOutOfSeq, mBuf);
1316    return ROK;
1317 }
1318
1319 \f
1320 #ifdef ANSI
1321 uint8_t cmUnpkKwuDatInd
1322 (
1323 KwuDatInd func,
1324 Pst *pst,
1325 Buffer *mBuf
1326 )
1327 #else
1328 uint8_t cmUnpkKwuDatInd(func, pst, mBuf)
1329 KwuDatInd func;
1330 Pst *pst;
1331 Buffer *mBuf;
1332 #endif
1333 {
1334     S16 ret1 = ROK, retVal;
1335     KwuDatIndInfo *datInd = NULLP;
1336     KwuDatIndInfo datIndTmp;
1337     
1338     TRC3(cmUnpkKwuDatInd)
1339
1340     switch(pst->selector)
1341     {
1342       case ODU_SELECTOR_LWLC:
1343          {
1344             CMCHKUNPK(oduUnpackPointer,(PTR *) &datInd, mBuf);
1345          }
1346          break;
1347       case ODU_SELECTOR_LC:
1348          {
1349             /*SGetStaticBuffer used as RRC has an equivalent free but PDCP
1350              * doesn't free any memory */
1351             if(pst->dstEnt != ENTPJ)
1352             {
1353                if((ret1 = SGetStaticBuffer(pst->region, pst->pool, (Data **)&datInd,
1354                            sizeof(KwuDatIndInfo),SS_SHARABLE_MEMORY)) != ROK)
1355                {
1356 #if (ERRCLASS & ERRCLS_ADD_RES)
1357        if(ret1 != ROK)
1358        {
1359           SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1360                 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1361                (ErrVal)EKWU028, (ErrVal)0, "SGetMsg() failed");
1362        }
1363 #endif /*  ERRCLASS & ERRCLS_ADD_RES  */
1364                   return (ret1);
1365                }
1366             }
1367             else
1368             {
1369                datInd = &datIndTmp;
1370             }
1371
1372             ret1 = cmUnpkKwuDatIndInfo( (datInd), mBuf);
1373 #if(ERRCLASS & ERRCLS_DEBUG)
1374           if(ret1 != ROK)
1375           {
1376              SPutMsg(mBuf);
1377              SLogError(pst->dstEnt, pst->dstInst, pst->dstProcId,
1378                    __FILE__, __LINE__, (ErrCls)ERRCLS_DEBUG,
1379                   (ErrVal)EKWU029, (ErrVal)ret1, "Unpacking failure");
1380              return ( ret1 );
1381           }
1382 #endif /* ERRCLASS & ERRCLS_DEBUG */
1383          }
1384          break;
1385       default:
1386          SPutMsg(mBuf);
1387          SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1388                __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1389                (ErrVal)ERRKWU, (ErrVal)ret1, "pst->selector is invalid\n");
1390          return RFAILED;
1391     }
1392     retVal = (*func)(pst, datInd, mBuf);
1393     /* If LWLC is configured and the destination entity is PDCP, we need to
1394      * free the memory here. */
1395     if((pst->selector == ODU_SELECTOR_LWLC) && (pst->dstEnt == ENTPJ))
1396     {
1397        retVal = SPutStaticBuffer(pst->region, pst->pool, (Data *)datInd,
1398                 sizeof(KwuDatIndInfo),SS_SHARABLE_MEMORY);
1399     }
1400     return (retVal);
1401 } /* cmUnpkKwuDatInd */
1402
1403 \f
1404 #ifdef ANSI
1405 PUBLIC S16 cmUnpkKwuDatCfmInfo
1406 (
1407 KwuDatCfmInfo *param,
1408 Buffer *mBuf
1409 )
1410 #else
1411 PUBLIC S16 cmUnpkKwuDatCfmInfo(param, mBuf)
1412 KwuDatCfmInfo *param;
1413 Buffer *mBuf;
1414 #endif
1415 {
1416    register S32 iter;
1417    TRC3(cmUnpkKwuDatCfmInfo);
1418
1419    CMCHKUNPK(cmUnpkLteRlcId, &param->rlcId, mBuf);
1420    CMCHKUNPK(oduPackUInt32, &param->numSduIds, mBuf);
1421
1422 #ifdef L2_L3_SPLIT /*Work Around */
1423    if (param->numSduIds >= KWU_MAX_DAT_CFM)
1424       param->numSduIds = KWU_MAX_DAT_CFM;
1425 #endif
1426    for(iter = param->numSduIds -1; iter >= 0 ; iter--)
1427    {
1428       CMCHKUNPK(oduPackUInt32, &param->sduIds[iter], mBuf);
1429    }
1430    return ROK;
1431 }
1432
1433 #ifdef ANSI
1434 PUBLIC S16 cmUnpkKwuDatCfm
1435 (
1436 KwuDatCfm func,
1437 Pst *pst,
1438 Buffer *mBuf
1439 )
1440 #else
1441 PUBLIC S16 cmUnpkKwuDatCfm(func, pst, mBuf)
1442 KwuDatCfm func;
1443 Pst *pst;
1444 Buffer *mBuf;
1445 #endif
1446 {
1447    S16 ret1 = ROK;
1448    SuId          suId = 0;
1449    KwuDatCfmInfo *datCfm = NULLP;
1450
1451    TRC3(cmUnpkKwuDatCfm)
1452
1453    CMCHKUNPK(SUnpkS16, &(suId), mBuf);
1454
1455    switch(pst->selector)
1456    {
1457       case ODU_SELECTOR_LWLC:
1458          {
1459             CMCHKUNPK(oduUnpackPointer,(PTR *) &datCfm, mBuf);
1460          }
1461          break;
1462       case ODU_SELECTOR_LC:
1463          {
1464             if((ret1 = SGetStaticBuffer(pst->region, pst->pool, (Data **)&datCfm,\
1465                         sizeof(KwuDatCfmInfo),SS_SHARABLE_MEMORY)) != ROK)
1466             {
1467 #if (ERRCLASS & ERRCLS_ADD_RES)
1468        if(ret1 != ROK)
1469        {
1470           SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1471                 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1472                (ErrVal)EKWU030, (ErrVal)0, "SGetMsg() failed");
1473        }
1474 #endif /*  ERRCLASS & ERRCLS_ADD_RES  */
1475                return (ret1);
1476             }
1477
1478             cmMemset((U8 *)datCfm, 0, sizeof(KwuDatCfmInfo));
1479             ret1 = cmUnpkKwuDatCfmInfo( (datCfm), mBuf);
1480 #if(ERRCLASS & ERRCLS_DEBUG)
1481           if(ret1 != ROK)
1482           {
1483              SPutMsg(mBuf);
1484              SLogError(pst->dstEnt, pst->dstInst, pst->dstProcId,
1485                    __FILE__, __LINE__, (ErrCls)ERRCLS_DEBUG,
1486                   (ErrVal)EKWU031, (ErrVal)ret1, "Unpacking failure");
1487              return ( ret1 );
1488           }
1489 #endif /* ERRCLASS & ERRCLS_DEBUG */
1490          }
1491          break;
1492       default:
1493 #if (ERRCLASS & ERRCLS_ADD_RES)
1494           SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1495                __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1496                (ErrVal)ERRKWU, (ErrVal)ret1, "pst->selector is invalid\n");
1497 #endif
1498           SPutMsg(mBuf);
1499           return RFAILED;
1500    }
1501
1502    SPutMsg(mBuf);
1503
1504    return ((*func)(pst, suId, datCfm));
1505 } /* cmUnpkKwuDatCfm */
1506
1507 \f
1508 #ifdef ANSI
1509 PUBLIC S16 cmUnpkKwuDiscSduReq
1510 (
1511 KwuDiscSduReq func,
1512 Pst *pst,
1513 Buffer *mBuf
1514 )
1515 #else
1516 PUBLIC S16 cmUnpkKwuDiscSduReq(func, pst, mBuf)
1517 KwuDiscSduReq func;
1518 Pst *pst;
1519 Buffer *mBuf;
1520 #endif
1521 {
1522    S16 ret1 = ROK;
1523    SpId          spId = 0;
1524    KwuDiscSduInfo *discSdu = NULLP;
1525
1526
1527    CMCHKUNPK(SUnpkS16, &(spId), mBuf);
1528    switch(pst->selector)
1529    {
1530       case ODU_SELECTOR_LWLC:
1531          {
1532             CMCHKUNPK(oduUnpackPointer,(PTR *) &discSdu, mBuf);
1533          }
1534          break;
1535       case ODU_SELECTOR_LC:
1536          {
1537             if((ret1 = SGetStaticBuffer(pst->region, pst->pool, (Data **)&discSdu,\
1538                         sizeof(KwuDiscSduInfo),SS_SHARABLE_MEMORY)) != ROK)
1539             {
1540 #if (ERRCLASS & ERRCLS_ADD_RES)
1541                /*MBUF_FIXX*/
1542                SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1543                      __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1544                      (ErrVal)EKWU032, (ErrVal)0, "SGetMsg() failed");
1545
1546 #endif /*  ERRCLASS & ERRCLS_ADD_RES  */
1547                return (ret1);
1548             }
1549
1550             cmMemset((U8 *)discSdu, 0, sizeof(KwuDiscSduInfo));
1551             ret1 = cmUnpkKwuDiscSduInfo( (discSdu), mBuf);
1552 #if(ERRCLASS & ERRCLS_DEBUG)
1553             if(ret1 != ROK)
1554             {
1555                SPutMsg(mBuf);
1556                SLogError(pst->dstEnt, pst->dstInst, pst->dstProcId,
1557                      __FILE__, __LINE__, (ErrCls)ERRCLS_DEBUG,
1558                      (ErrVal)EKWU033, (ErrVal)ret1, "Unpacking failure");
1559                return ( ret1 );
1560             }
1561 #endif /* ERRCLASS & ERRCLS_DEBUG */
1562             break;
1563          }
1564       default:
1565 #if (ERRCLASS & ERRCLS_ADD_RES)
1566           SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1567                __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1568                (ErrVal)ERRKWU, (ErrVal)ret1, "pst->selector is invalid\n");
1569 #endif
1570           SPutMsg(mBuf);
1571           return RFAILED;
1572    }
1573    SPutMsg(mBuf);
1574
1575    return ((*func)(pst, spId, discSdu));
1576 } /* cmUnpkKwuDiscSduReq */
1577
1578 \f
1579 #ifdef ANSI
1580 PUBLIC S16 cmUnpkKwuStaIndInfo
1581 (
1582 KwuStaIndInfo *param,
1583 Buffer *mBuf
1584 )
1585 #else
1586 PUBLIC S16 cmUnpkKwuStaIndInfo(param, mBuf)
1587 KwuStaIndInfo *param;
1588 Buffer *mBuf;
1589 #endif
1590 {
1591    U32 i;
1592
1593    TRC3(cmUnpkKwuStaIndInfo);
1594
1595    CMCHKUNPK(cmUnpkLteRlcId, &param->rlcId, mBuf);
1596    CMCHKUNPK(oduPackUInt32, &param->numSdu, mBuf);
1597    for (i = 0; i < param->numSdu; i++)
1598    {
1599       CMCHKUNPK(oduPackUInt32, &param->sduId[i], mBuf);
1600    }
1601
1602    return ROK;
1603 } /* cmUnpkKwuStaIndInfo */
1604
1605 \f
1606 #ifdef ANSI
1607 PUBLIC S16 cmUnpkKwuStaInd
1608 (
1609 KwuStaInd func,
1610 Pst *pst,
1611 Buffer *mBuf
1612 )
1613 #else
1614 PUBLIC S16 cmUnpkKwuStaInd(func, pst, mBuf)
1615 KwuStaInd func;
1616 Pst *pst;
1617 Buffer *mBuf;
1618 #endif
1619 {
1620    S16 ret1 = ROK;
1621    SuId          suId = 0;
1622    KwuStaIndInfo *staInd = NULLP;
1623
1624    TRC3(cmUnpkKwuStaInd)
1625
1626    CMCHKUNPK(SUnpkS16, &(suId), mBuf);
1627    
1628    switch(pst->selector)
1629    {
1630       case ODU_SELECTOR_LWLC:
1631          {
1632             CMCHKUNPK(oduUnpackPointer,(PTR *)&staInd, mBuf);
1633          }
1634          break;
1635       case ODU_SELECTOR_LC:
1636          {
1637             if((ret1 = SGetStaticBuffer(pst->region, pst->pool, (Data **)&staInd,\
1638                         sizeof(KwuStaIndInfo),SS_SHARABLE_MEMORY)) != ROK)
1639             {
1640 #if (ERRCLASS & ERRCLS_ADD_RES)
1641                if(ret1 != ROK)
1642                {
1643                   SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1644                         __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1645                         (ErrVal)EKWU034, (ErrVal)0, "SGetMsg() failed");
1646                }
1647 #endif /*  ERRCLASS & ERRCLS_ADD_RES  */
1648                return (ret1);
1649             }
1650
1651             cmMemset((U8 *)staInd, 0, sizeof(KwuStaIndInfo));
1652
1653             ret1 = cmUnpkKwuStaIndInfo( (staInd), mBuf);
1654 #if(ERRCLASS & ERRCLS_DEBUG)
1655             if(ret1 != ROK)
1656             {
1657                SPutMsg(mBuf);
1658                SLogError(pst->dstEnt, pst->dstInst, pst->dstProcId,
1659                      __FILE__, __LINE__, (ErrCls)ERRCLS_DEBUG,
1660                      (ErrVal)EKWU035, (ErrVal)ret1, "Unpacking failure");
1661                return ( ret1 );
1662             }
1663 #endif /* ERRCLASS & ERRCLS_DEBUG */
1664          }
1665          break;
1666       default:
1667           SPutMsg(mBuf);
1668 #if(ERRCLASS & ERRCLS_DEBUG)
1669           SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1670                __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1671                (ErrVal)ERRKWU, (ErrVal)ret1, "pst->selector is invalid\n");
1672 #endif
1673           return RFAILED;
1674    }
1675    SPutMsg(mBuf);
1676
1677    return ((*func)(pst, suId, staInd));
1678 } /* cmUnpkKwuStaInd */
1679
1680 \f
1681 #ifdef ANSI
1682 PUBLIC S16 cmUnpkKwuReEstCmpInd
1683 (
1684 KwuReEstCmpInd func,
1685 Pst *pst,
1686 Buffer *mBuf
1687 )
1688 #else
1689 PUBLIC S16 cmUnpkKwuReEstCmpInd(func, pst, mBuf)
1690 KwuReEstCmpInd func;
1691 Pst *pst;
1692 Buffer *mBuf;
1693 #endif
1694 {
1695 #if(ERRCLASS & ERRCLS_DEBUG)
1696    S16 ret1;
1697 #endif
1698    SuId          suId = 0;
1699    CmLteRlcId    rlcId;
1700
1701    TRC3(cmUnpkKwuReEstCmpInd)
1702
1703    cmMemset((U8 *)&rlcId, 0, sizeof(CmLteRlcId));
1704
1705    CMCHKUNPK(SUnpkS16, &(suId), mBuf);
1706    switch(pst->selector)
1707    {
1708 #ifdef LCKWU
1709       case ODU_SELECTOR_LC:
1710          {
1711 #if(ERRCLASS & ERRCLS_DEBUG)
1712             ret1 = cmUnpkLteRlcId( &rlcId, mBuf);
1713             if(ret1 != ROK)
1714             {
1715                SPutMsg(mBuf);
1716                SLogError(pst->dstEnt, pst->dstInst, pst->dstProcId,
1717                      __FILE__, __LINE__, (ErrCls)ERRCLS_DEBUG,
1718                      (ErrVal)EKWU035, (ErrVal)ret1, "Unpacking failure");
1719                return ( ret1 );
1720             }
1721 #else
1722             cmUnpkLteRlcId( &rlcId, mBuf);
1723 #endif /* ERRCLASS & ERRCLS_DEBUG */
1724             break;
1725          }
1726 #endif /* LCKWU */
1727    }
1728    SPutMsg(mBuf);
1729
1730    return ((*func)(pst, suId, rlcId));
1731 } /* cmUnpkKwuReEstCmpInd */
1732
1733 /* kwu_c_001.main_3 added support for L2 Measurement */
1734 #ifdef ANSI
1735 PUBLIC S16 cmUnpkKwuDiscSduCfm
1736 (
1737 KwuDiscSduCfm  func,
1738 Pst            *pst,
1739 Buffer         *mBuf
1740 )
1741 #else
1742 PUBLIC S16 cmUnpkKwuDiscSduCfm(func, pst, mBuf)
1743 KwuDiscSduCfm  func;
1744 Pst            *pst;
1745 Buffer         *mBuf;
1746 #endif
1747 {
1748    S16 ret1 = ROK;
1749    SpId          spId = 0;
1750    KwuDiscSduInfo *discSdu = NULLP;
1751
1752    TRC3(cmUnpkKwuDiscSduCfm);
1753
1754    CMCHKUNPK(SUnpkS16, &(spId), mBuf);
1755
1756    switch(pst->selector)
1757    {
1758       case ODU_SELECTOR_LWLC:
1759          {
1760             CMCHKUNPK(oduUnpackPointer,(PTR *) &discSdu, mBuf);
1761          }
1762          break;
1763       case ODU_SELECTOR_LC:
1764          {
1765             if((ret1 = SGetStaticBuffer(pst->region, pst->pool, (Data **)&discSdu,\
1766                         sizeof(KwuDiscSduInfo),SS_SHARABLE_MEMORY)) != ROK)
1767             {
1768 #if (ERRCLASS & ERRCLS_ADD_RES)
1769       if(ret1 != ROK)
1770       {
1771          SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1772                __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1773                (ErrVal)ERRKWU, (ErrVal)0, "SGetMsg() failed");
1774       }
1775 #endif /*  ERRCLASS & ERRCLS_ADD_RES  */
1776                return (ret1);
1777             }
1778             cmMemset((U8 *)discSdu, 0, sizeof(KwuDiscSduInfo));
1779
1780    ret1 = cmUnpkKwuDiscSduInfo( (discSdu), mBuf);
1781 #if(ERRCLASS & ERRCLS_DEBUG)
1782             if(ret1 != ROK)
1783             {
1784                SPutMsg(mBuf);
1785                SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1786                      __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1787                      (ErrVal)ERRKWU, (ErrVal)0, "SGetMsg() failed");
1788             }
1789 #endif /* ERRCLASS & ERRCLS_DEBUG */
1790          }
1791          break;
1792       default:
1793           SPutMsg(mBuf);
1794 #if(ERRCLASS & ERRCLS_DEBUG)
1795           SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1796                __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1797                (ErrVal)ERRKWU, (ErrVal)ret1, "pst->selector is invalid\n");
1798 #endif
1799           return RFAILED;
1800    }
1801    SPutMsg(mBuf);
1802
1803    return ((*func)(pst, spId, discSdu));
1804 } /* cmUnpkKwuDiscSduCfm */
1805 #ifdef ANSI
1806 PUBLIC S16 cmUnpkKwuFlowCntrlInd
1807 (
1808 KwuFlowCntrlInd  func,
1809 Pst            *pst,
1810 Buffer         *mBuf
1811 )
1812 #else
1813 PUBLIC S16 cmUnpkKwuFlowCntrlInd(func, pst, mBuf)
1814 KwuFlowCntrlInd  func;
1815 Pst            *pst;
1816 Buffer         *mBuf;
1817 #endif
1818 {
1819    SuId   suId;
1820    KwuFlowCntrlIndInfo *flowCntrlInfo = NULLP;
1821
1822    TRC3(cmUnpkKwuFlowCntrlInd);
1823    
1824    CMCHKUNPK(SUnpkS16, &(suId), mBuf);
1825    switch(pst->selector)
1826    {
1827 #ifdef LCKWU
1828       case ODU_SELECTOR_LC:
1829       {
1830          if(SGetStaticBuffer(pst->region, 
1831                      pst->pool, 
1832                      (Data **)&flowCntrlInfo,
1833                      sizeof(KwuFlowCntrlIndInfo),0) != ROK)
1834          {
1835             SPutMsg(mBuf);
1836             return RFAILED;
1837          }
1838
1839          cmUnpkKwuFlowCntrlIndInfo(flowCntrlInfo, mBuf);
1840       }
1841       break;
1842
1843       case ODU_SELECTOR_LWLC:
1844       {
1845          CMCHKUNPK(oduUnpackPointer,(PTR *) &flowCntrlInfo, mBuf);
1846       }
1847       break;
1848 #endif
1849    }
1850
1851    SPutMsg(mBuf);
1852
1853    return ((*func)(pst, suId, flowCntrlInfo));
1854 } /* cmUnpkKwuFlowCntrlInd */
1855 #ifdef LTE_L2_MEAS
1856 \f
1857 #ifdef ANSI
1858 PUBLIC S16 cmUnpkKwuDatAckInfo
1859 (
1860 KwuDatAckInfo *param,
1861 Buffer *mBuf
1862 )
1863 #else
1864 PUBLIC S16 cmUnpkKwuDatAckInfo(param, mBuf)
1865 KwuDatAckInfo *param;
1866 Buffer *mBuf;
1867 #endif
1868 {
1869    TRC3(cmUnpkKwuDatAckInfo);
1870
1871    CMCHKUNPK(oduPackUInt32, &param->sduId, mBuf);
1872    CMCHKUNPK(cmUnpkLteRlcId, &param->rlcId, mBuf);
1873
1874    return ROK;
1875 }
1876
1877 \f
1878 #ifdef ANSI
1879 PUBLIC S16 cmUnpkKwuDatAckInd
1880 (
1881 KwuDatAckInd func,
1882 Pst *pst,
1883 Buffer *mBuf
1884 )
1885 #else
1886 PUBLIC S16 cmUnpkKwuDatAckInd(func, pst, mBuf)
1887 KwuDatAckInd func;
1888 Pst *pst;
1889 Buffer *mBuf;
1890 #endif
1891 {
1892     S16 ret1;
1893     SuId          suId = 0;
1894     KwuDatAckInfo *datInd = NULLP;
1895     
1896     TRC3(cmUnpkKwuDatAckInd);
1897
1898     if((ret1 = SGetStaticBuffer(pst->region, pst->pool, (Data **)&datInd,\
1899                 sizeof(KwuDatAckInfo),SS_SHARABLE_MEMORY)) != ROK)
1900     {
1901 #if (ERRCLASS & ERRCLS_ADD_RES)
1902        if(ret1 != ROK)
1903        {
1904           SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1905                 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1906                 (ErrVal)ERRKWU, (ErrVal)0, "SGetMsg() failed");
1907        }
1908 #endif /*  ERRCLASS & ERRCLS_ADD_RES  */
1909        return (ret1);
1910     }
1911
1912     cmMemset((U8 *)datInd, 0, sizeof(KwuDatAckInfo));
1913
1914     CMCHKUNPK(SUnpkS16, &(suId), mBuf);
1915     ret1 = cmUnpkKwuDatAckInfo( (datInd), mBuf);
1916 #if(ERRCLASS & ERRCLS_DEBUG)
1917     if(ret1 != ROK)
1918     {
1919        SPutMsg(mBuf);
1920        SLogError(pst->dstEnt, pst->dstInst, pst->dstProcId,
1921              __FILE__, __LINE__, (ErrCls)ERRCLS_DEBUG,
1922              (ErrVal)ERRKWU, (ErrVal)ret1, "Unpacking failure");
1923        return ( ret1 );
1924     }
1925 #endif /* ERRCLASS & ERRCLS_DEBUG */
1926
1927     return ((*func)(pst, suId, datInd));
1928 } /* cmUnpkKwuDatAckInd */
1929 #endif /* LTE_L2_MEAS */
1930 #endif /* LCKWU */
1931
1932 /**********************************************************************
1933          End of file
1934  **********************************************************************/