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 *******************************************************************************/
18 #include "common_def.h"
19 #include "lwr_mac_upr_inf.h"
21 /*******************************************************************
23 * @brief Packs and Sends CRC Ind to MAC
27 * Function : packCrcInd
30 * Packs and Sends CRC Ind to MAC
32 * @params[in] Post structure pointer
34 * @return ROK - success
37 * ****************************************************************/
38 uint8_t packCrcInd(Pst *pst, CrcInd *crcInd)
40 if((pst->selector == ODU_SELECTOR_LC) || (pst->selector == ODU_SELECTOR_LWLC))
47 /*******************************************************************
49 * @brief Packs and Sends Rx Data Ind to MAC
53 * Function : packRxDataInd
56 * Packs and Sends Rx data Ind to MAC
58 * @params[in] Post structure pointer
60 * @return ROK - success
63 * ****************************************************************/
64 uint8_t packRxDataInd(Pst *pst, RxDataInd *rxDataInd)
66 if((pst->selector == ODU_SELECTOR_LC) || (pst->selector == ODU_SELECTOR_LWLC))
74 /*******************************************************************
76 * @brief Packs and Sends RACH Ind to MAC
80 * Function : packRachInd
83 * Packs and Sends RACH Ind to MAC
85 * @params[in] Post structure pointer
87 * @return ROK - success
90 * ****************************************************************/
91 uint8_t packRachInd(Pst *pst, RachInd *rachInd)
93 if((pst->selector == ODU_SELECTOR_LC) || (pst->selector == ODU_SELECTOR_LWLC))
100 /*******************************************************************
102 * @brief Loose coupled packing of slot indication
106 * Function : packLcSlotInd
109 * Loose coupled packing of slot indication
111 * @params[in] Post structure
112 * Slot indication info
113 * @return ROK - success
116 * ****************************************************************/
117 uint8_t packLcSlotInd (Pst *pst, SlotIndInfo *slotInd)
119 Buffer *mBuf = NULLP;
120 if (ODU_GET_MSG(pst->region, pst->pool, &mBuf) != ROK)
125 /* pack SFN and slot value */
126 CMCHKPK(oduUnpackUInt16,slotInd->sfn, mBuf);
127 CMCHKPK(oduUnpackUInt16,slotInd->slot, mBuf);
129 return ODU_POST_TASK(pst,mBuf);
132 /*******************************************************************
134 * @brief Light weight loose coupled packing of slot indication
138 * Function : packLwlcSlotInd
141 * Light weight loose coupled packing of slot indication
143 * @params[in] Post structure
144 * Slot indication info
145 * @return ROK - success
148 * ****************************************************************/
149 uint8_t packLwlcSlotInd (Pst *pst, SlotIndInfo *slotInd)
154 /*******************************************************************
156 * @brief Packs and Sends Stop Ind to MAC
160 * Function : packStopInd
163 * Packs and Sends Stop Ind to MAC
165 * @params[in] Post structure pointer
166 * @return ROK - success
169 * ****************************************************************/
170 uint8_t packStopInd(Pst *pst, uint16_t cellId)
172 if((pst->selector == ODU_SELECTOR_LC) || (pst->selector == ODU_SELECTOR_LWLC))
182 /*******************************************************************
184 * @brief Packs and Sends UCI Ind to MAC
188 * Function : packMacUciInd
191 * Packs and Sends Uci Ind to MAC
193 * @params[in] Post structure pointer
194 * @return ROK - success
197 * ****************************************************************/
198 uint8_t packMacUciInd(Pst *pst, UciInd *uciInd)
200 if((pst->selector == ODU_SELECTOR_LC) || (pst->selector == ODU_SELECTOR_LWLC))
209 /**********************************************************************
211 **********************************************************************/