072f221a5ffe26677d25773bd83c4b46e1856d50
[o-du/l2.git] / src / 5gnrmac / rg_lim.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:     LTE-MAC layer
22   
23      Type:     C source file
24   
25      Desc:     C source code for Entry point fucntions
26   
27      File:     rg_lim.c 
28   
29 **********************************************************************/
30
31 /** @file rg_lim.c.
32 @brief It has APIs exposed by Lower Interface Modulue of MAC. It acts as an 
33 Interface handler for lower interface APIs.
34 */
35 static const char* RLOG_MODULE_NAME="MAC";
36 static int RLOG_FILE_ID=182;
37 static int RLOG_MODULE_ID=4096;
38 /* header include files -- defines (.h) */
39 #include <stdbool.h>
40 #include "envopt.h"        /* environment options */
41 #include "envdep.h"        /* environment dependent */
42 #include "envind.h"        /* environment independent */
43 #include "gen.h"           /* general layer */
44 #include "ssi.h"           /* system services */
45 #include "cm5.h"           /* common timers defines */
46 #include "cm_hash.h"       /* common hash list defines */
47 #include "cm_llist.h"      /* common linked list defines */
48 #include "cm_mblk.h"       /* memory management */
49 #include "cm_tkns.h"       /* common tokens */
50 #include "cm_lte.h"       /* common tokens */
51 #include "rgu.h"           /* RGU defines */
52 #include "tfu.h"           /* RGU defines */
53 #include "lrg.h"           /* layer management defines for LTE-MAC */
54 #include "crg.h"           /* layer management defines for LTE-MAC */
55 #include "rg_sch_inf.h"           /* layer management defines for LTE-MAC */
56 #include "rg_env.h"        /* customisable defines and macros for MAC */
57 #include "rg.h"            /* defines and macros for MAC */
58 #include "du_log.h"
59
60 /* header/extern include files (.x) */
61 #include "gen.x"           /* general layer typedefs */
62 #include "ssi.x"           /* system services typedefs */
63 #include "cm5.x"           /* common timers */
64 #include "cm_hash.x"       /* common hash list */
65 #include "cm_lib.x"        /* common library */
66 #include "cm_llist.x"      /* common linked list */
67 #include "cm_mblk.x"       /* memory management */
68 #include "cm_tkns.x"       /* common tokens */
69 #include "cm_lte.x"       /* common tokens */
70 #include "rgu.x"           /* RGU types */
71 #include "tfu.x"           /* RGU types */
72 #include "lrg.x"           /* layer management typedefs for MAC */
73 #include "crg.x"           /* layer management typedefs for MAC */
74 #include "rg_sch_inf.x"    /* SCH interface typedefs */
75 #include "rg_prg.x"    /* PRG interface typedefs */
76 #include "du_app_mac_inf.h"
77 #include "rg.x"            /* typedefs for MAC */
78
79 #include "mac_upr_inf_api.h"
80 #include "mac.h"
81
82 /* local externs */
83 #ifdef UNUSED_FUNC
84 PRIVATE S16  rgLIMValidateSap ARGS((Inst inst,SuId suId));
85 #endif
86 PRIVATE Void rgLIMUtlFreeDatIndEvnt ARGS((TfuDatIndInfo *datInd,
87                                           Bool error));
88 #ifdef RG_UNUSED
89 PRIVATE Void rgLIMUtlFreeDatReqEvnt ARGS((TfuDatReqInfo *datReq,
90                                           Bool error));
91 #endif
92 /* forward references */
93
94 /**
95  * @brief This API is invoked to send TFU SAP bind request to PHY.
96  *
97  * @details
98  *
99  *     Function : rgLIMTfuBndReq
100  *      
101  *      This API is invoked to send TFU SAP bind request to PHY. It fills in 
102  *      the Pst structure, spId and suId values and invokes bind request
103  *      primitive at TFU.
104  *           
105  *  @param[in]  Inst        inst
106  *  @param[in]  SuId            suId 
107  *  @param[in]  SpId            spId
108  *  @return  S16
109  *      -# ROK 
110  *      -# RFAILED 
111  **/
112 #ifdef ANSI
113 PUBLIC S16 rgLIMTfuBndReq
114 (
115 Inst    inst,
116 SuId    suId, 
117 SpId    spId
118 )
119 #else
120 PUBLIC S16 rgLIMTfuBndReq(inst,suId, spId)
121 Inst    inst;
122 SuId    suId; 
123 SpId    spId;
124 #endif
125 {
126    S16         ret;
127    RgLowSapCb  *tfuSap;
128    Pst         pst;
129
130    TRC2(rgLIMTfuBndReq);
131
132    /* Get the lower SAP control block from the layer control block. */
133    tfuSap = &(rgCb[inst].tfuSap);
134    (Void)cmMemcpy ((U8*)&pst, (U8*)&(tfuSap->sapCfg.sapPst), sizeof(Pst));
135    if((ret = RgLiTfuBndReq (&pst, suId, spId)) != ROK)
136    {
137       RLOG0(L_ERROR,"Call to RgLiTfuBndReq() failed");
138    }
139    RETVALUE(ret);
140 }  /* rgLIMTfuBndReq */
141
142
143 /**
144  * @brief This API is invoked to send TFU SAP unbind request to PHY.
145  *
146  * @details
147  *
148  *     Function : rgLIMTfuBndReq
149  *      
150  *      This API is invoked to send TFU SAP unbind request to PHY. It fills in 
151  *      the Pst structure and spId value and invokes unbind request
152  *      primitive at TFU.
153  *           
154  *  @param[in]  Inst        inst
155  *  @param[in]  SpId            spId
156  *  @param[in]  Reason          reason 
157  *  @return  S16
158  *      -# ROK 
159  *      -# RFAILED 
160  **/
161 #ifdef ANSI
162 PUBLIC S16 rgLIMTfuUbndReq
163 (
164 Inst    inst,
165 SpId    spId, 
166 Reason  reason
167 )
168 #else
169 PUBLIC S16 rgLIMTfuUbndReq(inst,spId, reason)
170 Inst    inst;
171 SpId    spId; 
172 Reason  reason;
173 #endif
174 {
175    S16         ret;
176    RgLowSapCb  *tfuSap;
177    Pst         pst;
178
179    TRC2(rgLIMTfuUbndReq);
180
181    /* Get the lower SAP control block from the layer control block. */
182    tfuSap = &(rgCb[inst].tfuSap);
183    cmMemcpy ((U8*)&pst, (U8*)&(tfuSap->sapCfg.sapPst), sizeof(Pst));
184    if((ret = RgLiTfuUbndReq (&pst, tfuSap->sapCfg.spId, reason)) != ROK)
185    {
186       RLOG0(L_ERROR,"Call to RgLiTfuUbndReq() failed");
187    }
188    RETVALUE(ret);
189
190 }  /* rgLIMTfuUbndReq */
191
192
193 /**
194  * @brief Bind confirm API for TFU SAP 
195  *
196  * @details
197  *
198  *     Function : RgLiTfuBndCfm
199  *      
200  *      This API is invoked by PHY to confirm TFU SAP bind. 
201  *     
202  *           
203  *  @param[in]  Pst   *pst 
204  *  @param[in]  SuId  suId 
205  *  @param[in]  U8    status
206  *  @return  S16
207  *      -# ROK 
208  *      -# RFAILED 
209  **/
210 #ifdef ANSI
211 PUBLIC S16 RgLiTfuBndCfm 
212 (
213 Pst     *pst,
214 SuId    suId, 
215 U8      status
216 )
217 #else
218 PUBLIC S16 RgLiTfuBndCfm(pst, suId, status)
219 Pst     *pst; 
220 SuId    suId; 
221 U8      status;
222 #endif
223 {
224    Inst inst;
225    S16 ret;
226    RgLowSapCb  *tfuSap;
227
228    TRC3(RgLiTfuBndCfm);
229
230
231    RG_IS_INST_VALID(pst->dstInst);
232    inst = pst->dstInst - RG_INST_START;
233    /* Lets validate suId first */
234    /* CA_Change */
235    tfuSap = &(rgCb[inst].tfuSap);
236
237    if (suId != tfuSap->sapCfg.suId)
238    {
239       RLOG2(L_ERROR,"Incorrect SuId. Configured (%d) Recieved (%d)",
240             tfuSap->sapCfg.suId, suId);
241       RETVALUE(RFAILED);
242    }
243    ret = rgLMMBndCfm (pst, suId, status);
244    RETVALUE(ret);
245 }  /* RgLiTfuBndCfm */
246
247  /** @brief This function Validates the SAP information received along with the
248   * primitive from the lower layer. 
249   * Function:
250   *   Validates SAP information.
251  *  @param[in]  Inst        inst
252   * @param  suId The SAP Id
253   * @return 
254   *   -# ROK
255   *   -# RFAILED
256   */
257 #ifdef UNUSED_FUNC
258 #ifdef ANSI
259 PRIVATE S16 rgLIMValidateSap
260 (
261  Inst    inst,
262  SuId    suId
263 )
264 #else
265 PRIVATE S16 rgLIMValidateSap(inst,suId)
266  Inst    inst;
267  SuId    suId;
268 #endif
269 {
270    RgLowSapCb  *tfuSap;
271
272    TRC2(rgLIMValidateSap)
273
274    tfuSap = &(rgCb[inst].tfuSap);
275
276    /* First lets check the suId */
277    if( suId != tfuSap->sapCfg.suId)
278    {
279       RLOG2(L_ERROR,"Incorrect SuId. Configured (%d) Recieved (%d)",
280             tfuSap->sapCfg.suId, suId);
281       RETVALUE(RFAILED);
282    }
283    if (tfuSap->sapSta.sapState != LRG_BND)
284    {
285       RLOG1(L_ERROR,"Lower SAP not enabled SuId (%d)",
286             tfuSap->sapCfg.suId);
287       RETVALUE(RFAILED);
288    }
289    RETVALUE(ROK);
290 } /* end of rgLIMValidateSap */
291 #endif
292 /** @brief This function frees up the TfuDatIndInfo structure
293  *
294  * @details
295  *
296  *     Function: rgLIMUtlFreeDatIndEvnt 
297  *       - Function frees up the TfuDatIndInfo structure, in case of error it shall
298  *       free up the buffer's present in the datIndLst.
299  *
300  *         Processing steps:
301  * @param  [in] TfuDatIndInfo *datInd
302  * @param  [in] Bool          *error
303  * @return 
304  */
305 #ifdef ANSI
306 PRIVATE Void rgLIMUtlFreeDatIndEvnt 
307 (
308  TfuDatIndInfo *datInd,
309  Bool          error
310  )
311 #else
312 PRIVATE Void rgLIMUtlFreeDatIndEvnt(datInd, error)
313  TfuDatIndInfo *datInd;
314  Bool          error;
315 #endif
316 {
317
318    TfuDatInfo     *datInfo;
319    CmLList        *node;
320
321    TRC2(rgLIMUtlFreeDatIndEvnt);
322    /* Steps of freeing up the TfuDatInd.
323     * 1. loop through the datIndLst and free up all the buffers.
324     * 2. free up the whole event
325     */
326    if ((error == TRUE) && (datInd->datIndLst.count > 0))
327    {
328       node =  datInd->datIndLst.first;
329       while (node)
330       {
331          datInfo = (TfuDatInfo*)node->node;
332          RG_FREE_MSG(datInfo->mBuf);
333          node = node->next;
334       }
335    }
336    RG_FREE_MEM(datInd);
337    RETVOID;
338 } /* end of rgLIMUtlFreeDatIndEvnt*/
339
340 /**
341  * @brief Downlink data indication from PHY.
342  *
343  * @details
344  *
345  *     Function : RgLiTfuDatInd
346  *      
347  *      This API is invoked by PHY to send data indication to MAC on 
348  *      recieving data from UEs.
349  *           
350  *  @param[in]  Pst              *pst
351  *  @param[in]  SuId             suId 
352  *  @param[in]  TfuDatIndInfo    *datInd
353  *  @return  S16
354  *      -# ROK 
355  *      -# RFAILED 
356  **/
357 #ifdef ANSI
358 PUBLIC S16 RgLiTfuDatInd
359 (
360 Pst                *pst, 
361 SuId               suId, 
362 TfuDatIndInfo    *datInd
363 )
364 #else
365 PUBLIC S16 RgLiTfuDatInd(pst, suId, datInd)
366 Pst                *pst; 
367 SuId               suId; 
368 TfuDatIndInfo    *datInd;
369 #endif
370 {
371    Inst             inst;
372    S16              ret;
373    VOLATILE U32     startTime=0;
374
375    TRC3(RgLiTfuDatInd);
376
377   // printf("5GTF:: DatindRcvd\n");
378
379    RG_IS_INST_VALID(pst->dstInst);
380    inst = pst->dstInst - RG_INST_START;
381    /*starting Task*/
382    SStartTask(&startTime, PID_MAC_TFU_DATIND);
383
384 #ifndef NO_ERRCLS 
385    if ((ret = rgLIMValidateSap (inst,suId)) != ROK)
386    {
387       RLOG_ARG0(L_ERROR,DBG_CELLID,datInd->cellId,"SAP Validation failed");
388       rgLIMUtlFreeDatIndEvnt(datInd, TRUE);
389       RETVALUE(ret);
390    }
391 #endif
392    /* Now call the TOM (Tfu ownership module) primitive to process further */
393    rgCb[inst].tfuSap.sapSts.numPduRcvd += 
394                     datInd->datIndLst.count;
395    ret = rgTOMDatInd(inst,datInd);
396    /* Fix: sriky memory corruption precautions */
397    /* Free up the memory for the request structure */
398    if (ret == ROK)
399    {
400       rgLIMUtlFreeDatIndEvnt(datInd, FALSE);
401    }
402    else
403    {
404       rgLIMUtlFreeDatIndEvnt(datInd, TRUE);
405    }
406
407    /*stoping Task*/
408    SStopTask(startTime, PID_MAC_TFU_DATIND);
409
410    RETVALUE(ret);
411 }  /* RgLiTfuDatInd*/
412
413 #ifdef RG_UNUSED
414 /** @brief This function frees up the TfuDatReqInfo structure.
415  *
416  * @details
417  *
418  *     Function: rgLIMUtlFreeDatReqEvnt
419  *       - Function frees up the TfuDatReqInfo structure, in case of error it shall
420  *       free up the buffer's present in the PDUs list.
421  *
422  *         Processing steps:
423  * @param  [in] TfuDatReqInfo *datReq
424  * @param  [in] Bool          *error
425  * @return 
426  */
427 #ifdef ANSI
428 PRIVATE Void rgLIMUtlFreeDatReqEvnt
429 (
430  TfuDatReqInfo *datReq,
431  Bool          error
432  )
433 #else
434 PRIVATE Void rgLIMUtlFreeDatReqEvnt(datReq, error)
435  TfuDatReqInfo *datReq;
436  Bool          error;
437 #endif
438 {
439
440    TfuDatReqPduInfo *datInfo;
441    CmLList          *node;
442    U8               i;
443
444    TRC2(rgLIMUtlFreeDatReqEvnt);
445    /* Steps of freeing up the TfuDatReq.
446     * 1. Free the bch buffer.
447     * 2. loop through the pdus list and free up all the buffers.
448     * 3. free up the whole event
449     */
450    if (error)
451    {
452       if (datReq->bchDat.pres == PRSNT_NODEF)
453       {
454          RG_FREE_MSG(datReq->bchDat.val);
455       }
456       if (datReq->pdus.count > 0)
457       {
458          node =  datReq->pdus.first;
459          while (node)
460          {
461             datInfo = (TfuDatReqPduInfo*)node->node;
462             for (i=0; i<datInfo->nmbOfTBs; i++)
463             {
464                if (datInfo->mBuf[i] != NULLP)
465                {
466                   RG_FREE_MSG(datInfo->mBuf[i]);
467                }
468             }
469             node = node->next;
470          }
471       }
472    }
473    RG_FREE_MEM(datReq);
474    RETVOID;
475 } /* end of rgLIMUtlFreeDatReqEvnt*/
476 #endif
477 /**
478  * @brief This API is invoked to send Data to PHY.
479  *
480  * @details
481  *
482  *     Function : rgLIMTfuDatReq
483  *      
484  *      This API is invoked to send Data to PHY. It 
485  *      fills in the Pst structure, spId value and invokes Data
486  *      request primitive at TFU.
487  *           
488  *  @param[in]  Inst        inst
489  *  @param[in]  TfuDatReqInfo *datReq
490  *  @return  S16
491  *      -# ROK 
492  *      -# RFAILED 
493  **/
494 #ifdef ANSI
495 PUBLIC S16 rgLIMTfuDatReq 
496 (
497 Inst          inst,
498 TfuDatReqInfo *datReq
499 )
500 #else
501 PUBLIC S16 rgLIMTfuDatReq(inst,datReq)
502 Inst          inst;
503 TfuDatReqInfo *datReq;
504 #endif
505 {
506    S16         ret;
507    RgLowSapCb  *tfuSap;
508
509    TRC2(rgLIMTfuDatReq)
510
511    /* Get the lower SAP control block from the layer control block. */
512    tfuSap = &(rgCb[inst].tfuSap);
513
514 #ifndef NO_ERRCLS
515    if (tfuSap->sapSta.sapState != LRG_BND)
516    {
517       RLOG_ARG1(L_ERROR,DBG_CELLID,datReq->cellId,"Lower SAP not bound (%d)",
518             tfuSap->sapSta.sapState);
519 #ifdef RG_UNUSED
520       /* This case will never be hit if sap is not bound then we dont get TTI */
521       rgLIMUtlFreeDatReqEvnt(datReq, TRUE);
522 #endif
523       RETVALUE(RFAILED);
524    }
525 #endif
526
527    tfuSap->sapSts.numPduTxmit += datReq->pdus.count; 
528
529    /* Using existing pst - for optimization */
530    if((ret = RgLiTfuDatReq (&tfuSap->sapCfg.sapPst, tfuSap->sapCfg.spId, 
531                             datReq)) != ROK)
532    {
533       RLOG_ARG0(L_ERROR,DBG_CELLID,datReq->cellId,"Call to RgLiTfuDatReq() failed");
534    }
535    RETVALUE(ret);
536 }  /* rgLIMTfuDatReq*/
537
538 #ifdef L2_OPTMZ
539 /**
540  * @brief This API is invoked to send Data to PHY.
541  *
542  * @details
543  *
544  *     Function : rgLIMTfuDelDatReq
545  *      
546  *      This API is invoked to send Data to PHY. It 
547  *      fills in the Pst structure, spId value and invokes Data
548  *      request primitive at TFU.
549  *           
550  *  @param[in]  Inst        inst
551  *  @param[in]  TfuDelDatReqInfo *datReq
552  *  @return  S16
553  *      -# ROK 
554  *      -# RFAILED 
555  **/
556 #ifdef ANSI
557 PUBLIC S16 rgLIMTfuDelDatReq 
558 (
559 Inst          inst,
560 TfuDelDatReqInfo *delDatReq
561 )
562 #else
563 PUBLIC S16 rgLIMTfuDatReq(inst,delDatReq)
564 Inst          inst;
565 TfuDelDatReqInfo *delDatReq;
566 #endif
567 {
568    S16         ret;
569    RgLowSapCb  *tfuSap;
570
571    TRC2(rgLIMTfuDelDatReq)
572
573    /* Get the lower SAP control block from the layer control block. */
574    tfuSap = &(rgCb[inst].tfuSap);
575
576 #ifndef NO_ERRCLS
577    if (tfuSap->sapSta.sapState != LRG_BND)
578    {
579       RLOG_ARG1(L_ERROR,DBG_CELLID,delDatReq->cellId,"Lower SAP not bound (%d)",
580             tfuSap->sapSta.sapState);
581       RETVALUE(RFAILED);
582    }
583 #endif
584
585    if((ret = RgLiTfuDelDatReq (&tfuSap->sapCfg.sapPst, tfuSap->sapCfg.spId, 
586                             delDatReq)) != ROK)
587    {
588       RLOG_ARG0(L_ERROR,DBG_CELLID,delDatReq->cellId,"Call to RgLiTfuDelDatReq() failed");
589    }
590    RETVALUE(ret);
591 }  /* rgLIMTfuDatReq*/
592 #endif /*L2_OPTMZ */
593
594 /*******************************************************************
595  *
596  * @brief Fills post structure
597  *
598  * @details
599  *
600  *    Function : fillMacToSchPst
601  *
602  *    Functionality:
603  *      Fills post structure to be used when sending msg from 
604  *      MAC to SCH
605  *
606  * @params[in] Post structure pointer 
607  * @return ROK     - success
608  *         RFAILED - failure
609  *
610  * ****************************************************************/
611 void fillMacToSchPst(Pst *pst)
612 {
613    pst->srcProcId = 0;
614    pst->dstProcId = 0;
615    pst->srcEnt = ENTRG;
616    pst->dstEnt = ENTRG;
617    pst->srcInst = 0;
618    pst->dstInst = 1;
619    pst->region = 0;
620    pst->pool =  0;
621    pst->selector = MAC_SELECTOR_TC;
622 }
623
624 /*******************************************************************
625  *
626  * @brief MAC handler for config response from PHY
627  *
628  * @details
629  *
630  *    Function : fapiMacConfigRsp
631  *
632  *    Functionality:
633  *     Processes config response from PHY and sends cell config
634  *     confirm to DU APP
635  *
636  * @params[in] 
637  * @return void
638  *
639  * ****************************************************************/
640 void fapiMacConfigRsp()
641 {
642    /* TODO : Processing of config response from PHY */
643
644    /* Send cell config cfm to DU APP */
645    MacSendCellCfgCfm(RSP_OK);
646 }
647
648 /*******************************************************************
649  *
650  * @brief Send stop indication to DU APP
651  *
652  * @details
653  *
654  *    Function : sendStopIndMacToDuApp
655  *
656  *    Functionality:
657  *       Send stop indication to DU APP
658  *
659  * @params[in] Pst info 
660  * @return ROK     - success
661  *         RFAILED - failure
662  *
663  * ****************************************************************/
664 uint8_t sendStopIndMacToDuApp()
665 {
666    Pst pst;
667    uint8_t ret = ROK;
668
669    MacCellStopInfo *cellStopId; 
670   
671    /*  Allocate sharable memory */
672    MAC_ALLOC_SHRABL_BUF(cellStopId, sizeof(MacCellStopInfo));
673    if(!cellStopId)
674    {
675       DU_LOG("\nMAC : Stop Indication memory allocation failed");
676       return RFAILED;
677    }
678    cellStopId->cellId = macCb.macCell->cellId;
679
680    /* Fill Pst */
681    pst.selector  = DU_MAC_LWLC;
682    pst.srcEnt    = ENTRG;
683    pst.dstEnt    = ENTDUAPP;
684    pst.dstInst   = 0;
685    pst.srcInst   = macCb.macInst;
686    pst.dstProcId = rgCb[pst.srcInst].rgInit.procId;
687    pst.srcProcId = rgCb[pst.srcInst].rgInit.procId;
688    pst.region = MAC_MEM_REGION;
689    pst.pool = MAC_POOL;
690    pst.event = EVENT_MAC_STOP_IND;
691    pst.route = 0;
692    pst.prior = 0;
693    pst.intfVer = 0;
694
695    ret = MacDuAppStopInd(&pst, cellStopId);
696    if(ret != ROK)
697    {
698       DU_LOG("\nMAC: Failed to send stop indication to DU APP");
699       MAC_FREE_SHRABL_BUF(MAC_MEM_REGION, MAC_POOL, cellStopId, sizeof(MacCellStopInfo));
700    }
701    return ROK;
702 }
703 #if defined(TENB_T2K3K_SPECIFIC_CHANGES) && defined(LTE_TDD)
704  /**
705  * @brief Transmission of non-rt indication from CL.
706  *
707  * @details
708  *
709  *     Function : RgLiTfuNonRtInd 
710  *      
711  *      This API is invoked by CL to indicate non-rt processing indication to MAC for a cell.
712  *           
713  *  @param[in]  Pst            *pst
714  *  @param[in]  SuId           suId 
715  *  @return  S16
716  *      -# ROK 
717  *      -# RFAILED 
718  **/
719 #ifdef ANSI
720 PUBLIC S16 RgLiTfuNonRtInd
721 (
722 Pst                 *pst,
723 SuId                suId
724 )
725 #else
726 PUBLIC S16 RgLiTfuNonRtInd(pst, suId)
727 Pst                 *pst;
728 SuId                suId;
729 #endif
730 {
731    TRC3(RgLiTfuNonRtInd);
732
733 #ifdef NO_ERRCLS
734    if (rgLIMValidateSap (pst->dstInst - RG_INST_START, suId) != ROK)
735    {
736       RGDBGERRNEW(pst->dstInst - RG_INST_START, (rgPBuf(pst->dstInst - RG_INST_START),"RgLiTfuNonRtInd() SAP Validation failed.\n"));
737       RETVALUE(RFAILED);
738    }
739 #endif
740    rgDHMFreeTbBufs(pst->dstInst - RG_INST_START);
741    RETVALUE(ROK);
742 }  /* RgLiTfuNonRtInd */
743
744 #endif
745 /**********************************************************************
746  
747          End of file
748 **********************************************************************/