1 /*******************************************************************************
2 ################################################################################
3 # Copyright (c) [2017-2019] [Radisys] #
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 #
9 # http://www.apache.org/licenses/LICENSE-2.0 #
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 *******************************************************************************/
19 /************************************************************************
25 Desc: C source code file for SPS related functions which are
30 **********************************************************************/
31 /* header include files -- defines (.h) */
32 #include "envopt.h" /* environment options */
33 #include "envdep.h" /* environment dependent */
34 #include "envind.h" /* environment independent */
35 #include "gen.h" /* general layer */
36 #include "ssi.h" /* system service interface */
37 #include "cm_hash.h" /* common hash list */
38 #include "cm_llist.h" /* common linked list library */
39 #include "cm_err.h" /* common error */
40 #include "cm_lte.h" /* common LTE */
46 #include "rg_sch_inf.h"
48 #include "rg_sch_err.h"
49 #include "rg_sch_cmn.h"
51 /* header/extern include files (.x) */
52 #include "gen.x" /* general layer typedefs */
53 #include "ssi.x" /* system services typedefs */
54 #include "cm5.x" /* common timers */
55 #include "cm_hash.x" /* common hash list */
56 #include "cm_lib.x" /* common library */
57 #include "cm_llist.x" /* common linked list */
58 #include "cm_mblk.x" /* memory management */
59 #include "cm_tkns.x" /* common tokens */
60 #include "cm_lte.x" /* common tokens */
61 #include "tfu.x" /* TFU types */
62 #include "lrg.x" /* layer management typedefs for MAC */
63 #include "rgr.x" /* layer management typedefs for MAC */
64 #include "rgm.x" /* layer management typedefs for MAC */
65 #include "rg_sch_inf.x" /* typedefs for Scheduler */
66 #include "rg_sch.x" /* typedefs for Scheduler */
67 #include "rg_sch_cmn.x"
70 *@brief Initializes the SPS related global data structures
73 * Function : rgSCHCmnSpsInit
80 PUBLIC Void rgSCHCmnSpsInit
84 PUBLIC Void rgSCHCmnSpsInit ()
87 TRC2(rgSCHCmnSpsInit);
93 *@brief Initializes UE with SPS info
96 * Function : rgSCHCmnSpsUeCfg
103 PUBLIC S16 rgSCHCmnSpsUeCfg
111 PUBLIC S16 rgSCHCmnSpsUeCfg (cell, ue, ueCfg, err)
119 TRC2(rgSCHCmnSpsUeCfg);
125 *@brief Re-Initializes UE with SPS info
128 * Function : rgSCHCmnSpsUeReCfg
135 PUBLIC S16 rgSCHCmnSpsUeRecfg
143 PUBLIC S16 rgSCHCmnSpsUeRecfg (cell, ue, ueCfg, err)
151 TRC2(rgSCHCmnSpsUeRecfg);
157 *@brief Clears the UE of SPS info
160 * Function : rgSCHCmnSpsUeDel
167 PUBLIC Void rgSCHCmnSpsUeDel
173 PUBLIC Void rgSCHCmnSpsUeDel (cell, ue)
179 TRC2(rgSCHCmnSpsUeDel);
184 *@brief Validates cell config for SPS
187 * Function : rgSCHCmnSpsCellCfg
194 PUBLIC S16 rgSCHCmnSpsCellCfg
201 PUBLIC S16 rgSCHCmnSpsCellCfg(cell, cellCfg, err)
208 TRC2(rgSCHCmnSpsCellCfg);
213 *@brief Deletes cell config for SPS
216 * Function : rgSCHCmnSpsCellDel
223 PUBLIC Void rgSCHCmnSpsCellDel
228 PUBLIC Void rgSCHCmnSpsCellDel (cell)
233 TRC2(rgSCHCmnSpsCellDel);
238 *@brief Configures DL LC for SPS
241 * Function :rgSCHCmnSpsDlLcCfg
248 PUBLIC S16 rgSCHCmnSpsDlLcCfg
257 PUBLIC S16 rgSCHCmnSpsDlLcCfg(cell, ue, dlLc, lcCfg, err)
266 TRC2(rgSCHCmnSpsDlLcCfg);
270 Void rgSchCmnDlSfHqDel
276 TRC2(rgSchCmnDlSfHqDel);
280 S16 rgSCHCmnSpsDlLcRecfg ARGS((
284 RgrLchRecfg *lcRecfg,
289 TRC2(rgSCHCmnSpsDlLcRecfg);
293 Void rgSCHCmnSpsUlLcgDel ARGS((
299 TRC2(rgSCHCmnSpsUlLcgDel);
303 Void rgSCHCmnSpsDlLcDel ARGS((
309 TRC2(rgSCHCmnSpsUlLcgDel);
313 S16 rgSCHCmnSpsUlTti ARGS((
315 RgSchCmnUlRbAllocInfo *allocInfo
319 TRC2(rgSCHCmnSpsUlTti);
323 Void rgSCHCmnSpsDlDedBoUpd ARGS((
330 TRC2(rgSCHCmnSpsDlDedBoUpd);
334 Void rgSCHCmnSpsDlProcAddToRetx ARGS((
340 TRC2(rgSCHCmnSpsDlProcAddToRetx);
344 Void rgSCHCmnSpsDlCqiIndHndlr ARGS((
347 CmLteTimingInfo timingInfo
351 TRC2(rgSCHCmnSpsDlCqiIndHndlr);
355 S16 rgSCHCmnSpsUlCqiInd ARGS((
361 TRC2(rgSCHCmnSpsUlCqiInd);
365 S16 rgSCHCmnSpsBsrRpt ARGS((
372 TRC2(rgSCHCmnSpsBsrRpt);
376 Void rgSCHCmnSpsPhrInd ARGS((
382 TRC2(rgSCHCmnSpsPhrInd);
386 Void rgSCHCmnSpsDlRelPdcchFbk ARGS((
393 TRC2(rgSCHCmnSpsDlRelPdcchFbk);
397 Void rgSCHCmnSpsDlProcAck ARGS((
403 TRC2(rgSCHCmnSpsDlProcAck);
407 Void rgSCHCmnSpsDlUeReset ARGS((
413 TRC2(rgSCHCmnSpsDlUeReset);
417 Void rgSCHCmnSpsUlUeReset ARGS((
423 TRC2(rgSCHCmnSpsUlUeReset);
427 Void rgSCHCmnSpsUlProcRelInd ARGS((
434 TRC2(rgSCHCmnSpsUlProcRelInd);
438 Void rgSCHCmnSpsUlProcActInd ARGS((
445 TRC2(rgSCHCmnSpsUlProcActInd);
449 S16 rgSCHCmnSpsUlProcCrcInd ARGS((
452 CmLteTimingInfo crcTime
456 TRC2(rgSCHCmnSpsUlProcActInd);
460 S16 rgSCHCmnSpsUlProcDtxInd ARGS((
463 CmLteTimingInfo dtxTime
467 TRC2(rgSCHCmnSpsUlProcDtxInd);
471 Void rgSCHCmnSpsDlUpdDlSfAllocWithSps ARGS((
473 CmLteTimingInfo schdTime,
478 TRC2(rgSCHCmnSpsUlProcDtxInd);
486 /**********************************************************************
489 **********************************************************************/