[Epic-ID: ODUHIGH-464][Task-ID: ODUHIGH-483] Memeory related fix in FDD and TDD mode
[o-du/l2.git] / src / 5gnrmac / rg_uhm.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_uhm.c
28   
29 **********************************************************************/
30
31 /** @file rg_uhm.c
32 @brief This module handles uplink harq related functionality in MAC.
33 */
34
35 /* header include files -- defines (.h) */
36 #include "common_def.h"
37 #include "rg_env.h"        /* MAC Environment Defines */
38 #include "tfu.h"           /* TFU Interface defines */
39 #include "crg.h"           /* CRG Interface defines */
40 #include "rgu.h"           /* RGU Interface defines */
41 #include "rg_sch_inf.h"           /* TFU Interface defines */
42 #include "lrg.h"           /* LRG Interface defines */
43
44 #include "rg.h"            /* MAC defines */
45 #include "rg_err.h"        /* MAC error defines */
46
47 /* header/extern include files (.x) */
48
49 #include "tfu.x"           /* TFU Interface defines */
50 #include "crg.x"           /* CRG Interface includes */
51 #include "rgu.x"           /* RGU Interface includes */
52 #include "rg_sch_inf.x"    /* SCH Interface defines */
53 #include "rg_prg.x"        /* PRG Interface defines */
54 #include "lrg.x"           /* LRG Interface includes */
55
56 #include "du_app_mac_inf.h"
57 #include "rg.x"            /* MAC includes */
58
59 /* local defines */
60
61 /* local typedefs */
62  
63 /* local externs */
64  
65 /* forward references */
66
67 /**
68  * @brief Handler for initializing the HARQ entity.
69  *
70  * @details
71  *
72  *     Function: rgUHMCrgUeCfg
73  *     
74  *     Invoked by: CRG
75  *
76  *     Processing Steps: 
77  *      -  Initialize maxHqRetx
78  *           
79  *  @param[in]      *cellCb
80  *  @param[in,out]  *ueCb
81  *  @param[in]      *ueCfg
82  *  @param[out]     *err
83  *  @return  Void
84  **/
85 Void rgUHMCrgUeCfg
86 (
87 RgCellCb       *cellCb,
88 RgUeCb         *ueCb,
89 CrgUeCfg       *ueCfg
90 )
91 {
92    ueCb->ul.hqEnt.maxHqRetx = (ueCfg->ueUlHqCfg.maxUlHqTx - 1); 
93    return;
94 }  /* rgUHMCrgUeCfg */
95
96 /**
97  * @brief Handler for re-initializing the HARQ entity.
98  *
99  * @details
100  *
101  *     Function: rgUHMCrgUeRecfg
102  *     
103  *     Invoked by: CRG
104  *
105  *     Processing Steps: 
106  *      -  Re-initialize maxHqRetx
107  *           
108  *  @param[in]      *cellCb
109  *  @param[in,out]  *ueCb
110  *  @param[in]      *ueCfg
111  *  @param[out]     *err
112  *  @return  Void
113  **/
114 Void rgUHMCrgUeRecfg
115 (
116 RgCellCb       *cellCb,
117 RgUeCb         *ueCb,
118 CrgUeRecfg     *ueRecfg
119 )
120 {
121
122    ueCb->ul.hqEnt.maxHqRetx = (ueRecfg->ueUlHqRecfg.maxUlHqTx - 1); 
123    return;
124 }  /* rgUHMCrgUeCfg */
125
126 /**********************************************************************
127  
128          End of file
129 **********************************************************************/