Moving all common header file into common_def.h file
[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 #ifdef ANSI
86 PUBLIC Void rgUHMCrgUeCfg
87 (
88 RgCellCb       *cellCb,
89 RgUeCb         *ueCb,
90 CrgUeCfg       *ueCfg
91 )
92 #else
93 PUBLIC Void rgUHMCrgUeCfg(cellCb, ueCb, ueCfg) 
94 RgCellCb       *cellCb;
95 RgUeCb         *ueCb;
96 CrgUeCfg       *ueCfg;
97 #endif
98 {
99    TRC2(rgUHMCrgUeCfg);
100
101    ueCb->ul.hqEnt.maxHqRetx = (ueCfg->ueUlHqCfg.maxUlHqTx - 1); 
102    RETVOID;
103 }  /* rgUHMCrgUeCfg */
104
105 /**
106  * @brief Handler for re-initializing the HARQ entity.
107  *
108  * @details
109  *
110  *     Function: rgUHMCrgUeRecfg
111  *     
112  *     Invoked by: CRG
113  *
114  *     Processing Steps: 
115  *      -  Re-initialize maxHqRetx
116  *           
117  *  @param[in]      *cellCb
118  *  @param[in,out]  *ueCb
119  *  @param[in]      *ueCfg
120  *  @param[out]     *err
121  *  @return  Void
122  **/
123 #ifdef ANSI
124 PUBLIC Void rgUHMCrgUeRecfg
125 (
126 RgCellCb       *cellCb,
127 RgUeCb         *ueCb,
128 CrgUeRecfg     *ueRecfg
129 )
130 #else
131 PUBLIC Void rgUHMCrgUeRecfg(cellCb, ueCb, ueRecfg) 
132 RgCellCb       *cellCb;
133 RgUeCb         *ueCb;
134 CrgUeRecfg     *ueRecfg;
135 #endif
136 {
137    TRC2(rgUHMCrgUeRecfg);
138
139    ueCb->ul.hqEnt.maxHqRetx = (ueRecfg->ueUlHqRecfg.maxUlHqTx - 1); 
140    RETVOID;
141 }  /* rgUHMCrgUeCfg */
142
143 /**********************************************************************
144  
145          End of file
146 **********************************************************************/