HDR_FILES+=$(wildcard $(CM_DIR)/lrg*.[hx])
HDR_FILES+=$(wildcard $(CM_DIR)/rgr.[hx])
HDR_FILES+=$(wildcard $(CM_DIR)/rgm.[hx])
+HDR_FILES+=$(wildcard $(CM_DIR)/mac*.[hx])
# Add the product specific header files
HDR_FILES+= $(wildcard $(SRC_DIR)/*.[hx])
#include "ssi.x"
#include "cm_hash.x"
#include "cm_lib.x"
-#include "lcl.h"
+#include "mac_interface.h"
typedef enum
{
typedef struct cellCb
{
U16 cellId;
- ClCellCfg cellCfg;
+ MacCellCfg cellCfg;
PhyState phyState;
}ClCellCb;
RgCellCb *prevCell; /*!< Reference of last accessed cellCb*/
U8 bufCnt; /*!< Count of buffers in buffersToFree[] */
Buffer *bufToFree[RG_MAX_DFRD_FREE_BUFS];/*!< List of Shared Buffers to be freed */
+ MacCellCfg macCellCfg; /* MAC cell config paramters */
};
/* Declaration for RgCb */
#include "crg.x" /* CRG interface includes */
#include "rg_sch_inf.x" /* SCH interface typedefs */
#include "rg_prg.x" /* PRG (MAC-MAC) Interface typedefs */
+#include "mac_interface.h"
#include "rg.x" /* typedefs for MAC */
#ifdef LTE_ADV
#include "rg_pom_scell.x"
#include "ssi.x"
#include "cm_hash.x"
#include "cm_lib.x"
-#include "lcl.h"
+#include "mac_interface.h"
typedef enum
{
typedef struct cellCb
{
U16 cellId;
- ClCellCfg cellCfg;
+ MacCellCfg cellCfg;
PhyState phyState;
}ClCellCb;
#include "cm_hash.x"
#include "cm_lib.x"
-#include "lcl.h"
+#include "mac_interface.h"
#include "lwr_mac.h"
EXTERN S16 rgClBldAndSndFAPICfgReq ARGS((ClCellCb *cellCb));
* ****************************************************************/
PRIVATE S16 rgClVldtCellCfg
(
-ClCellCfg *cellCfg
+MacCellCfg *cellCfg
)
{
RETVALUE(ROK);
* ****************************************************************/
PUBLIC U16 RgClCellCfgReq
(
-ClCellCfg *cellCfg
+MacCellCfg *cellCfg
)
{
ClCellCb *cellCb = NULLP;
clGlobalCp.numOfCells++;
}
- cmMemcpy((U8 *)&cellCb->cellCfg, (U8 *)cellCfg, sizeof(ClCellCfg));
+ cmMemcpy((U8 *)&cellCb->cellCfg, (U8 *)cellCfg, sizeof(MacCellCfg));
/* Build and send CONFIG request to PHY */
if(rgClBldAndSndFAPICfgReq(cellCb) != ROK )
#include "ssi.x"
#include "cm_hash.x"
-#include "lcl.h"
+#include "mac_interface.h"
#include "lwr_mac.h"
#include "rg_cl_phy.h"
#include "fapi.h"
U8 *configTlvs;
L1L2ConfigReq *FAPIConfigReq;
L1L2Tlv *nextTlv;
- ClCellCfg cellCfg;
+ MacCellCfg cellCfg;
FAPIConfigReqSize = sizeof(L1L2ConfigReq)
+ (cellCb->cellCfg.numTlv * sizeof(L1L2Tlv));
/* Filling SSB configuration */
fillConfigTLV(nextTlv, configTlvs, CFG_TAG_SS_PBCH_PWR, sizeof(U16), cellCfg.ssbCfg.ssbPbchPwr, &msgLen);
- fillConfigTLV(nextTlv, configTlvs, CFG_TAG_BCH_PAYLOAD, sizeof(U16), cellCfg.ssbCfg.bchPayload, &msgLen);
+ fillConfigTLV(nextTlv, configTlvs, CFG_TAG_BCH_PAYLOAD, sizeof(U16), cellCfg.ssbCfg.bchPayloadOption, &msgLen);
fillConfigTLV(nextTlv, configTlvs, CFG_TAG_SCS_COMM, sizeof(U16), cellCfg.ssbCfg.scsCmn, &msgLen);
fillConfigTLV(nextTlv, configTlvs, CFG_TAG_SSB_OFFS_POINT_A, sizeof(U16), cellCfg.ssbCfg.ssbPrbOffset, &msgLen);
fillConfigTLV(nextTlv, configTlvs, CFG_TAG_BETA_PSS, sizeof(U16), cellCfg.ssbCfg.betaPss, &msgLen);
#include "gen.x"
#include "cm_hash.h"
#include "cm_hash.x"
-#include "lcl.h"
#include "lwr_mac.h"
/*******************************************************************
#include "tfu.x"
#include "rg_sch_inf.x"
#include "rg_prg.x" /* PRG interface typedefs*/
+#include "mac_interface.h"
#include "rg.x"
#ifdef LTE_ADV
#include "rg_pom_scell.x"
#include "tfu.x"
#include "rg_sch_inf.x"
#include "rg_prg.x" /* PRG interface typedefs*/
+#include "mac_interface.h"
#include "rg.x"
#include "tfu.x"
#include "rg_sch_inf.x"
#include "rg_prg.x" /* PRG interface typedefs */
+#include "mac_interface.h"
#include "rg.x"
#ifdef L2_OPTMZ
#include "rgu.x" /* RGU Interface includes */
#include "lrg.x" /* LRG Interface includes */
+#include "mac_interface.h"
#include "rg.x" /* MAC includes */
/* local defines */
#include "crg.x" /* CRG interface typedes */
#include "rg_sch_inf.x" /* SCH interface typedefs */
#include "rg_prg.x" /*PRG interface includes*/
+#include "mac_interface.h"
#include "rg.x" /* typedefs for MAC */
cmUnpkLrgStsReq(RgMiLrgStsReq, pst, mBuf);
break;
#endif /* LCRGMILRG */
+ case EVENT_MAC_CELL_CONFIG_REQ:
+ /* Process MAC cell config */
+ cmUnpackLwLcMacCellCfg(unpackMacCellCfgReq, pst, mBuf);
+ break;
default:
RG_FREE_MSG(mBuf);
break;
#include "crg.x" /* layer management typedefs for MAC */
#include "rg_sch_inf.x" /* typedefs for Scheduler */
#include "rg_prg.x" /* typedefs for PRG interface */
+#include "mac_interface.h"
#include "rg.x" /* MAC types */
#ifdef LTE_L2_MEAS
#include "crg.x" /* layer management typedefs for MAC */
#include "rg_sch_inf.x" /* SCH interface typedefs */
#include "rg_prg.x" /* PRG interface typedefs */
+#include "mac_interface.h"
#include "rg.x" /* typedefs for MAC */
/* local defines */
#include "rg_prg.x" /* PRG Interface includes */
#include "lrg.x" /* LRG Interface includes */
#include "rgr.x" /* LRG Interface includes */
+#include "mac_interface.h"
#include "rg.x" /* MAC includes */
#ifdef SS_DIAG
#include "ss_diag.h" /* Common log file */
Pst *cfmPst
));
+extern U16 cmPackLcMacCellCfgCfm(Pst *pst, MacCellCfgCfm *macCellCfgCfm);
+extern U16 cmPackTcMacCellCfgCfm(Pst *pst, MacCellCfgCfm *macCellCfgCfm);
+extern U16 cmPackLwlcMacCellCfgCfm(Pst *pst, MacCellCfgCfm *macCellCfgCfm);
+
+packMacCellCfgCfm packMacCellCfmMt[] =
+{
+ cmPackLcMacCellCfgCfm, /* packing for loosely coupled */
+ cmPackTcMacCellCfgCfm, /* packing for tightly coupled */
+ cmPackLwlcMacCellCfgCfm, /* packing for light weight loosly coupled */
+};
\f
/**
* @brief Task Initiation callback function.
case STTFUSAP:
reason = rgLMMSapCfg(inst,&cfg->t.cfg, cfg->hdr.elmId.elmnt);
break;
- case STCLCELL:
- reason = RgClCellCfgReq(&cfg->t.cfg.s.cellCfg);
default:
ret = LCM_PRIM_NOK;
reason = LCM_REASON_INVALID_ELMNT;
} /* end of MacSchCfgReq*/
\f
+/***********************************************************
+ *
+ * Func : macCellCfgFillCfmPst
+ *
+ *
+ * Desc : Fills the Confirmation Post Structure cfmPst
+ *
+ * Ret : Void
+ *
+ * Notes:
+ *
+ * File : rg_lmm.c
+ *
+ **********************************************************/
+Void macCellCfgFillCfmPst
+(
+Pst *reqPst,
+Pst *cfmPst
+)
+{
+ Inst inst;
+ inst = reqPst->dstInst;
+
+ cfmPst->srcEnt = rgCb[inst].rgInit.ent;
+ cfmPst->srcInst = rgCb[inst].rgInit.inst;
+ cfmPst->srcProcId = rgCb[inst].rgInit.procId;
+
+ cfmPst->srcEnt = reqPst->dstEnt;
+ cfmPst->dstEnt = reqPst->srcEnt;
+ cfmPst->srcInst = reqPst->dstInst;
+ cfmPst->dstInst = reqPst->srcInst;
+ cfmPst->srcProcId = reqPst->dstProcId;
+ cfmPst->dstProcId = reqPst->srcProcId;
+
+ cfmPst->selector = LRG_SEL_LC;
+ cfmPst->prior = reqPst->prior;
+ cfmPst->route = reqPst->route;
+ cfmPst->region = reqPst->region;
+ cfmPst->pool = reqPst->pool;
+ cfmPst->event = EVENT_MAC_CELL_CONFIG_CFM;
+
+ RETVOID;
+}
+
+/**
+ * @brief Layer Manager Configuration request handler.
+ *
+ * @details
+ *
+ * Function : unpackMacCellCfgReq
+ *
+ * This function handles the gNB and cell configuration
+ * request received from DU APP.
+ * This API unapcks and forwards the config towards SCH
+ *
+ * @param[in] Pst *pst
+ * @param[in] MacCellCfg *macCellCfg
+ * @return S16
+ * -# ROK
+ **/
+S16 unpackMacCellCfgReq
+(
+ Pst *pst,
+ MacCellCfg *macCellCfg
+)
+{
+ U16 ret = ROK;
+ MacCellCfgCfm macCellCfgCfm;
+ Pst cnfPst;
+ Inst inst = pst->dstInst;
+
+ memcpy(&rgCb[inst].macCellCfg,macCellCfg,sizeof(MacCellCfg));
+
+ macCellCfgFillCfmPst(pst,&cnfPst);
+
+ macCellCfgCfm.transId = macCellCfg->transId;
+ //ret = cmPackLcMacCellCfgCfm(&cnfPst,&macCellCfgCfm);
+ ret = (*packMacCellCfmMt[cnfPst.selector])(&cnfPst,&macCellCfgCfm);
+ return ret;
+} /* end of unpackMacCellCfgReq */
+
+\f
/**********************************************************************
End of file
#include "rgu.x" /* RGU Interface includes */
#include "lrg.x" /* LRG Interface includes */
+#include "mac_interface.h"
#include "rg.x" /* MAC includes */
#include "ss_queue.h"
#include "ss_queue.x"
#include "tfu.x"
#include "rg_sch_inf.x"
#include "rg_prg.x" /* PRG interface typedefs*/
+#include "mac_interface.h"
#include "rg.x"
#ifdef LTE_ADV
#include "rg_pom_scell.x"
#include "crg.x" /* layer management typedefs for MAC */
#include "rg_sch_inf.x" /* layer management typedefs for MAC */
#include "rg_prg.x" /* Prg(MAC-MAC)interface includes */
+#include "mac_interface.h"
#include "rg.x" /* typedefs for MAC */
#ifdef LTE_ADV
#include "crg.x" /* layer management typedefs for MAC */
#include "rg_sch_inf.x" /* layer management typedefs for MAC */
#include "rg_prg.x" /* PRG interface typedefs*/
+#include "mac_interface.h"
#include "rg.x" /* typedefs for MAC */
#ifdef LTE_ADV
#include "rg_prg.x" /* PRG Interface includes */
#include "lrg.x" /* LRG Interface includes */
+#include "mac_interface.h"
#include "rg.x" /* MAC includes */
/* local defines */
#include "rg_prg.x" /* PRG Interface includes */
#include "lrg.x" /* LRG Interface includes */
+#include "mac_interface.h"
#include "rg.x" /* MAC includes */
/* local defines */
#include "rg_prg.x" /* PRG interface typedefs */
#include "rgm.x" /* layer management typedefs for MAC */
#include "rgm.h" /* layer management typedefs for MAC */
+#include "mac_interface.h"
#include "rg.x" /* typedefs for MAC */
#ifdef MAC_RLC_UL_RBUF
#include "rg_prg.x" /* PRG Interface defines */
#include "lrg.x" /* LRG Interface includes */
+#include "mac_interface.h"
#include "rg.x" /* MAC includes */
/* local defines */
#include "rgu.x"
#include "rg_sch_inf.x"
#include "rg_prg.x" /* PRG interface typedefs*/
+#include "mac_interface.h"
#include "rg.x" /* typedefs for MAC */
#include "ss_rbuf.h"
#include "lrg.x" /* LRG Interface includes */
#include "rg_prg.x" /* PRG(MAC-MAC) Interface includes */
+#include "mac_interface.h"
#include "rg.x" /* MAC includes */
/* local defines */
/* functions in other modules */
/* public variable declarations */
+U16 gTransId = 0;
/* private variable declarations */
} /* end of cmUnpkIntf */
#endif /* TDS_ROLL_UPGRADE_SUPPORT */
+/*
+*
+* Fun: cmGetTransId
+*
+* Desc: This function return the transaction ID used for interface transactions
+*
+* Ret: gTransId
+*
+* File: cm_gen.c
+*
+*/
+U16 cmGetTransId()
+{
+ if(gTransId<65535)
+ gTransId++;
+ else
+ gTransId = 0;
+ return gTransId;
+}
/**********************************************************************
End of file
**********************************************************************/
#define STRGRSAP STGEN + 2
#define STTFUSAP STGEN + 4
#define STSCHINST STGEN + 5 /* Scheduler Instance */
-#define STCLCELL STGEN + 6 /* CL cell */
#define LRG_USTA_DGNVAL_MEM 1
#define LRG_USTA_DGNVAL_HARQ 2
#ifndef __LRGX__
#define __LRGX__
-#include "lcl.h"
/* ccpu00121930 : ADD: c++ support*/
#ifdef __cplusplus
RgUpSapCfg crgSap; /*!< CRG interface SAP */
RgLowSapCfg tfuSap; /*!< TFU interface SAP */
RgSchInstCfg schInstCfg;/*!< General Configuration for scheduler instances */
- ClCellCfg cellCfg;
}s;
}RgCfg;
--- /dev/null
+/*******************************************************************************
+################################################################################
+# Copyright (c) [2017-2019] [Radisys] #
+# #
+# Licensed under the Apache License, Version 2.0 (the "License"); #
+# you may not use this file except in compliance with the License. #
+# You may obtain a copy of the License at #
+# #
+# http://www.apache.org/licenses/LICENSE-2.0 #
+# #
+# Unless required by applicable law or agreed to in writing, software #
+# distributed under the License is distributed on an "AS IS" BASIS, #
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
+# See the License for the specific language governing permissions and #
+# limitations under the License. #
+################################################################################
+*******************************************************************************/
+
+#include "envopt.h" /* Environment options */
+#include "envdep.h" /* Environment dependent */
+#include "envind.h" /* Environment independent */
+#include "gen.h" /* General */
+#include "ssi.h" /* System services */
+#include "ss_queue.h"
+#include "ss_task.h"
+#include "ss_msg.h"
+#include "gen.x" /* general */
+#include "ssi.x" /* system services */
+#include "cm_tkns.x" /* Common Token Definitions */
+#include "cm_llist.x" /* Common Link List Definitions */
+#include "cm_lib.x" /* Common Library Definitions */
+#include "cm_hash.x" /* Common Hash List Definitions */
+#include "cm_lte.x" /* Common LTE Defines */
+
+#include "mac_interface.h"
+
+/**************************************************************************
+ * @brief Function to pack Loose Coupled
+ * MAC cell config parameters required by MAC
+ *
+ * @details
+ *
+ * Function : packLcMacCellCfg
+ *
+ * Functionality:
+ * packs the macCellCfg parameters
+ *
+ * @param[in] Pst *pst, Post structure of the primitive.
+ * @param[in] MacCellCfg *macCellCfg, mac cell config parameters.
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ ***************************************************************************/
+S16 packLcMacCellCfg(Pst *pst, MacCellCfg *macCellCfg)
+{
+ return ROK;
+}
+
+/**************************************************************************
+ * @brief Function to pack tightly Coupled
+ * MAC cell config parameters required by MAC
+ *
+ * @details
+ *
+ * Function : packTcMacCellCfg
+ *
+ * Functionality:
+ * packs the macCellCfg parameters
+ *
+ * @param[in] Pst *pst, Post structure of the primitive.
+ * @param[in] MacCellCfg *macCellCfg, mac cell config parameters.
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ ***************************************************************************/
+S16 packTcMacCellCfg(Pst *pst, MacCellCfg *macCellCfg)
+{
+ return ROK;
+}
+
+/**************************************************************************
+ * @brief Function to pack light weight Loose Coupled
+ * MAC cell config parameters required by MAC
+ *
+ * @details
+ *
+ * Function : packLwLcMacCellCfg
+ *
+ * Functionality:
+ * packs the macCellCfg parameters
+ *
+ * @param[in] Pst *pst, Post structure of the primitive.
+ * @param[in] MacCellCfg *macCellCfg, mac cell config parameters.
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ ***************************************************************************/
+S16 packLwLcMacCellCfg(Pst *pst, MacCellCfg *macCellCfg)
+{
+ Buffer *mBuf = NULLP;
+
+ if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK)
+ {
+ RETVALUE(RFAILED);
+ }
+
+ /* pack the address of the structure */
+ CMCHKPK(cmPkPtr,(PTR)macCellCfg, mBuf);
+
+ RETVALUE(SPstTsk(pst,mBuf));
+}
+
+/**************************************************************************
+ * @brief Function to pack Loose Coupled
+ * MAC cell config parameters required by MAC
+ *
+ * @details
+ *
+ * Function : unpackLwLcMacCellCfg
+ *
+ * Functionality:
+ * packs the macCellCfg parameters
+ *
+ * @param[in] DuMacCellCfgReq func; function pointer
+ * @param[in] Pst *pst, Post structure of the primitive.
+ * @param[in] Buffer *mBuf
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ ***************************************************************************/
+void cmUnpackLwLcMacCellCfg(
+ DuMacCellCfgReq func,
+ Pst *pst,
+ Buffer *mBuf)
+{
+ MacCellCfg *macCellCfg;
+
+ /* unpack the address of the structure */
+ CMCHKUNPK(cmUnpkPtr, (PTR *)&macCellCfg, mBuf);
+
+ RETVALUE((*func)(pst, macCellCfg));
+}
+
+/**************************************************************************
+ * @brief Function to pack Loose Coupled
+ * MAC cell config confirm message
+ *
+ * @details
+ *
+ * Function : cmPackLcMacCellCfgCfm
+ *
+ * Functionality:
+ * packs the transaction ID
+ *
+ * @param[in] Pst *pst, Post structure of the primitive.
+ * @param[in] MacCellCfgCfm *macCellCfgCfm, mac cell config confirm.
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ ***************************************************************************/
+U16 cmPackLcMacCellCfgCfm(Pst *pst, MacCellCfgCfm *macCellCfgCfm)
+{
+ Buffer *mBuf = NULLP;
+ if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK)
+ {
+ RETVALUE(RFAILED);
+ }
+
+ /* pack the transaction ID in CNF structure */
+ CMCHKPK(SPkU16, macCellCfgCfm->transId, mBuf);
+
+ RETVALUE(SPstTsk(pst,mBuf));
+}
+
+/**************************************************************************
+ * @brief Function to pack tightly Coupled
+ * MAC cell config confirm message
+ *
+ * @details
+ *
+ * Function : cmPackTcMacCellCfgCfm
+ *
+ * Functionality:
+ * packs the transaction ID
+ *
+ * @param[in] Pst *pst, Post structure of the primitive.
+ * @param[in] MacCellCfgCfm *macCellCfgCfm, mac cell config confirm.
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ ***************************************************************************/
+U16 cmPackTcMacCellCfgCfm(Pst *pst, MacCellCfgCfm *macCellCfgCfm)
+{
+ return ROK;
+}
+
+/**************************************************************************
+ * @brief Function to pack light weight Loose Coupled
+ * MAC cell config confirm message
+ *
+ * @details
+ *
+ * Function : cmPackLwlcMacCellCfgCfm
+ *
+ * Functionality:
+ * packs the transaction ID
+ *
+ * @param[in] Pst *pst, Post structure of the primitive.
+ * @param[in] MacCellCfgCfm *macCellCfgCfm, mac cell config confirm.
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ ***************************************************************************/
+U16 cmPackLwlcMacCellCfgCfm(Pst *pst, MacCellCfgCfm *macCellCfgCfm)
+{
+ return ROK;
+}
+
+/**************************************************************************
+ * @brief Function to pack MAC cell config confirm message
+ *
+ * @details
+ *
+ * Function : cmUnpackLcMacCellCfgCfm
+ *
+ * Functionality:
+ * packs the transaction ID
+ *
+ * @param[in] DuMacCellCfgCfm func; function pointer
+ * @param[in] Pst *pst, Post structure of the primitive.
+ * @param[in] Buffer *mBuf
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ ***************************************************************************/
+S16 cmUnpackLcMacCellCfgCfm(
+ DuMacCellCfgCfm func,
+ Pst *pst,
+ Buffer *mBuf)
+{
+ MacCellCfgCfm macCellCfgCfm;
+ /* pack the transaction ID in CNF structure */
+ CMCHKUNPK(SUnpkU16, &(macCellCfgCfm.transId), mBuf);
+
+ RETVALUE((*func)(&macCellCfgCfm));
+}
--- /dev/null
+/*******************************************************************************
+################################################################################
+# Copyright (c) [2017-2019] [Radisys] #
+# #
+# Licensed under the Apache License, Version 2.0 (the "License"); #
+# you may not use this file except in compliance with the License. #
+# You may obtain a copy of the License at #
+# #
+# http://www.apache.org/licenses/LICENSE-2.0 #
+# #
+# Unless required by applicable law or agreed to in writing, software #
+# distributed under the License is distributed on an "AS IS" BASIS, #
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
+# See the License for the specific language governing permissions and #
+# limitations under the License. #
+################################################################################
+*******************************************************************************/
+
+/* Defines APIs exchanged between du_app and cl module of MAC */
+#ifndef __MACINT_H__
+#define __MACINT_H__
+
+#define NUM_NUMEROLOGY 5 /* Number of numerology */
+#define MAXIMUM_TDD_PERIODICITY 5
+#define MAX_SYMB_PER_SLOT 14
+
+#define NUM_SSB 1 /* max value is 64 */
+#define SSB_MASK_SIZE 1 /* SSB mask size is 32bit for sub6 */
+
+
+/* Event IDs */
+#define EVENT_MAC_CELL_CONFIG_REQ 200
+#define EVENT_MAC_CELL_CONFIG_CFM 201
+
+typedef enum
+{
+ DUP_MODE_FDD,
+ DUP_MODE_TDD
+}DuplexMode;
+
+typedef enum
+{
+ MAC_GEN_FULL_PBCH_PAYLD, /* MAC generated the full PBCH Payload */
+ PHY_GEN_TIMING_PBCH_BIT, /* PHY generates the timing PBCH bits */
+ PHY_GEN_FULL_PBCH_PAYLD /* PHY generates full PBCH payload */
+}BchPduOpt;
+
+typedef enum
+{
+ LONG_SEQUENCE,
+ SHORT_SEQUENCE
+}PrachSeqLen;
+
+typedef enum
+{
+ UNRESTRICTED,
+ RESTRICTED_SET_TYPE_A,
+ RESTRICTED_SET_TYPE_B
+}RstSetCfg;
+
+typedef enum
+{
+ DONT_REPORT_RSSI,
+ RSSI_UNIT_DBM,
+ RSSI_UNIT_DBFS
+}RSSIMeasUnit;
+
+typedef enum
+{
+ DL_SLOT,
+ UL_SLOT,
+ GUARD_SLOT
+}SlotConfig;
+
+typedef enum
+{
+ TX_PRDCTY_MS_0P5,
+ TX_PRDCTY_MS_0P625,
+ TX_PRDCTY_MS_1,
+ TX_PRDCTY_MS_1P25,
+ TX_PRDCTY_MS_2,
+ TX_PRDCTY_MS_2P5,
+ TX_PRDCTY_MS_5,
+ TX_PRDCTY_MS_10
+}DlUlTxPeriodicity;
+
+typedef enum
+{
+ BETA_PSS_0DB,
+ BETA_PSS_1DB
+}BetaPss;
+
+typedef enum
+{
+ SSB_PRDCTY_MS_5,
+ SSB_PRDCTY_MS_10,
+ SSB_PRDCTY_MS_20,
+ SSB_PRDCTY_MS_40,
+ SSB_PRDCTY_MS_80,
+ SSB_PRDCTY_MS_160
+}SSBPeriod;
+
+typedef struct carrierCfg
+{
+ Bool pres;
+ U16 bw; /* DL/UL bandwidth */
+ U32 freq; /* Absolute frequency of DL/UL point A in KHz */
+ U16 k0[NUM_NUMEROLOGY]; /* K0 for DL/UL */
+ U16 gridSize[NUM_NUMEROLOGY]; /* DL/UL Grid size for each numerologies */
+ U16 numAnt; /* Number of Tx/Rx antennas */
+}CarrierCfg;
+
+typedef struct ssbCfg
+{
+ U32 ssbPbchPwr; /* SSB block power */
+ BchPduOpt bchPayloadOption; /* Options for generation of payload */
+ U8 scsCmn; /* subcarrier spacing for common */
+ U16 ssbPrbOffset; /* SSB PRB offset from point A */
+ BetaPss betaPss;
+ SSBPeriod ssbPeriod; /* SSB Periodicity in msec */
+ U8 ssbSubcOffset; /* Subcarrier Offset */
+ U32 mibPdu; /* MIB payload */
+ U32 nSSBMask[SSB_MASK_SIZE]; /* Bitmap for actually transmitted SSB. */
+ U8 beamId[NUM_SSB];
+ Bool multCarrBand; /* Multiple carriers in a band */
+ Bool multCellCarr; /* Multiple cells in single carrier */
+}SsbCfg;
+
+typedef struct fdmInfo
+{
+ U16 rootSeqIdx; /* Root sequence index */
+ U8 numRootSeq; /* Number of root sequences required for FD */
+ U16 k1; /* Frequency Offset for each FD */
+ U8 zeroCorrZoneCfg; /* Zero correlation zone cofig */
+ U8 numUnusedRootSeq; /* Number of unused root sequence */
+ U8 *unsuedRootSeq; /* Unused root sequence per FD */
+}FdmInfo;
+
+typedef struct prachCfg
+{
+ Bool pres;
+ PrachSeqLen prachSeqLen; /* RACH Sequence length: Long/short */
+ U8 prachSubcSpacing; /* Subcarrier spacing of RACH */
+ RstSetCfg prachRstSetCfg; /* PRACH restricted set config */
+ U8 prachFdm; /* PRACH FDM (1,2,4,8) */
+ FdmInfo fdm[8];
+ U8 ssbPerRach; /* SSB per RACH occassion */
+ Bool prachMultCarrBand; /* Multiple carriers in Band */
+}PrachCfg;
+
+typedef struct tddCfg
+{
+ Bool pres;
+ DlUlTxPeriodicity tddPeriod; /* DL UL Transmission periodicity */
+ SlotConfig slotCfg[MAXIMUM_TDD_PERIODICITY][MAX_SYMB_PER_SLOT];
+}TDDCfg;
+
+typedef struct macCellCfg
+{
+ U16 transId;
+ U8 numTlv; /* Number of configuration TLVs */
+ U8 carrierId; /* Carrired Index */
+ U16 cellId; /* Cell Id */
+ U16 phyCellId; /* Physical cell id */
+ DuplexMode dupType; /* Duplex type: TDD/FDD */
+ CarrierCfg dlCarrCfg; /* DL Carrier configuration */
+ CarrierCfg ulCarrCfg; /* UL Carrier configuration */
+ Bool freqShft; /* Indicates presence of 7.5kHz frequency shift */
+ SsbCfg ssbCfg; /* SSB configuration */
+ PrachCfg prachCfg; /* PRACH Configuration */
+ TDDCfg tddCfg; /* TDD periodicity and slot configuration */
+ RSSIMeasUnit rssiUnit; /* RSSI measurement unit */
+}MacCellCfg;
+
+typedef struct macCellCfgCfm
+{
+ U16 transId;
+}MacCellCfgCfm;
+
+/* function pointers for packing macCellCfg Request */
+typedef S16 (*packMacCellCfgReq) ARGS((
+ Pst *pst,
+ MacCellCfg *macCellCfg
+));
+
+typedef S16 (*packMacCellCfgCfm) ARGS((
+ Pst *pst,
+ MacCellCfgCfm *macCellCfgCfm
+));
+
+typedef S16 (*DuMacCellCfgReq) ARGS((
+ Pst *pst, /* Post Structure */
+ MacCellCfg *macCellCfg /* Config Structure */
+ ));
+
+typedef S16 (*DuMacCellCfgCfm) ARGS((
+ MacCellCfgCfm *macCellCfgCfm /* Config Structure */
+ ));
+
+S16 packLcMacCellCfg(Pst *pst, MacCellCfg *macCellCfg);
+
+S16 packTcMacCellCfg(Pst *pst, MacCellCfg *macCellCfg);
+
+S16 packLwLcMacCellCfg(Pst *pst, MacCellCfg *macCellCfg);
+
+
+EXTERN S16 unpackMacCellCfgReq
+(
+ Pst *pst,
+ MacCellCfg *macCellCfg
+);
+
+void cmUnpackLwLcMacCellCfg(
+ DuMacCellCfgReq func,
+ Pst *pst,
+ Buffer *mBuf);
+
+S16 cmUnpackLcMacCellCfgCfm(
+ DuMacCellCfgCfm func,
+ Pst *pst,
+ Buffer *mBuf);
+
+EXTERN S16 duHandleMacCellCfgCfm
+(
+ MacCellCfgCfm *macCellCfgCfm
+);
+
+#endif
+
+/**********************************************************************
+ End of file
+**********************************************************************/
extern S16 cmPkRgrCfgReq(Pst* pst, RgrCfgTransId transId, \
RgrCfgReqInfo *cfgReqInfo);
+extern S16 duBuildAndSendMacCellCfg();
+
/*******************************************************************
*
* @brief Processes cells to be activated
SPutSBuf(DU_APP_MEM_REGION, DU_POOL,(Data *)&f1apMsg,(Size)sizeof(F1AP_PDU_t));
#endif
- /* Build and send GNB-DU config update */
- ret = BuildAndSendDUConfigUpdate();
+ /* Build and send Mac Cell Cfg Paramaters */
+ ret = duBuildAndSendMacCellCfg();
+
return ret;
}
for(slot = 0; slot <= 3; slot++)
{
for(symbol = 0; symbol < MAX_SYMB_PER_SLOT; symbol++)
- duCfgParam.clCellCfg.tddCfg.slotCfg[slot][symbol] = DL_SLOT;
+ duCfgParam.macCellCfg.tddCfg.slotCfg[slot][symbol] = DL_SLOT;
}
- duCfgParam.clCellCfg.tddCfg.slotCfg[3][10] = GUARD_SLOT;
- duCfgParam.clCellCfg.tddCfg.slotCfg[3][11] = GUARD_SLOT;
- duCfgParam.clCellCfg.tddCfg.slotCfg[3][12] = GUARD_SLOT;
- duCfgParam.clCellCfg.tddCfg.slotCfg[3][13] = UL_SLOT;
+ duCfgParam.macCellCfg.tddCfg.slotCfg[3][10] = GUARD_SLOT;
+ duCfgParam.macCellCfg.tddCfg.slotCfg[3][11] = GUARD_SLOT;
+ duCfgParam.macCellCfg.tddCfg.slotCfg[3][12] = GUARD_SLOT;
+ duCfgParam.macCellCfg.tddCfg.slotCfg[3][13] = UL_SLOT;
for(symbol = 0; symbol < MAX_SYMB_PER_SLOT; symbol++)
- duCfgParam.clCellCfg.tddCfg.slotCfg[4][symbol] = UL_SLOT;
+ duCfgParam.macCellCfg.tddCfg.slotCfg[4][symbol] = UL_SLOT;
}
*
* @details
*
- * Function : readClCfg
+ * Function : readMacCfg
*
* Functionality:
* - Fills up the cell configuration for CL.
/* This function is used to fill up the cell configuration for CL */
-S16 readClCfg()
+S16 readMacCfg()
{
- duCfgParam.clCellCfg.carrierId = CARRIER_IDX;
+ duCfgParam.macCellCfg.carrierId = CARRIER_IDX;
/* Cell configuration */
- duCfgParam.clCellCfg.cellId = NR_CELL_ID;
- duCfgParam.clCellCfg.phyCellId = NR_PCI;
- duCfgParam.clCellCfg.dupType = DUPLEX_MODE;
+ duCfgParam.macCellCfg.cellId = NR_CELL_ID;
+ duCfgParam.macCellCfg.phyCellId = NR_PCI;
+ duCfgParam.macCellCfg.dupType = DUPLEX_MODE;
/* DL carrier configuration */
- duCfgParam.clCellCfg.dlCarrCfg.pres = TRUE;
- duCfgParam.clCellCfg.dlCarrCfg.bw = SUL_ARFCN;
- duCfgParam.clCellCfg.dlCarrCfg.freq = NR_ARFCN;
- duCfgParam.clCellCfg.dlCarrCfg.k0[0] = 1;
- duCfgParam.clCellCfg.dlCarrCfg.k0[1] = 1;
- duCfgParam.clCellCfg.dlCarrCfg.k0[2] = 1;
- duCfgParam.clCellCfg.dlCarrCfg.k0[3] = 1;
- duCfgParam.clCellCfg.dlCarrCfg.k0[4] = 1;
- duCfgParam.clCellCfg.dlCarrCfg.gridSize[0] = 1;
- duCfgParam.clCellCfg.dlCarrCfg.gridSize[1] = 1;
- duCfgParam.clCellCfg.dlCarrCfg.gridSize[2] = 1;
- duCfgParam.clCellCfg.dlCarrCfg.gridSize[3] = 1;
- duCfgParam.clCellCfg.dlCarrCfg.gridSize[4] = 1;
- duCfgParam.clCellCfg.dlCarrCfg.numAnt = NUM_TX_ANT;
+ duCfgParam.macCellCfg.dlCarrCfg.pres = TRUE;
+ duCfgParam.macCellCfg.dlCarrCfg.bw = SUL_ARFCN;
+ duCfgParam.macCellCfg.dlCarrCfg.freq = NR_ARFCN;
+ duCfgParam.macCellCfg.dlCarrCfg.k0[0] = 1;
+ duCfgParam.macCellCfg.dlCarrCfg.k0[1] = 1;
+ duCfgParam.macCellCfg.dlCarrCfg.k0[2] = 1;
+ duCfgParam.macCellCfg.dlCarrCfg.k0[3] = 1;
+ duCfgParam.macCellCfg.dlCarrCfg.k0[4] = 1;
+ duCfgParam.macCellCfg.dlCarrCfg.gridSize[0] = 1;
+ duCfgParam.macCellCfg.dlCarrCfg.gridSize[1] = 1;
+ duCfgParam.macCellCfg.dlCarrCfg.gridSize[2] = 1;
+ duCfgParam.macCellCfg.dlCarrCfg.gridSize[3] = 1;
+ duCfgParam.macCellCfg.dlCarrCfg.gridSize[4] = 1;
+ duCfgParam.macCellCfg.dlCarrCfg.numAnt = NUM_TX_ANT;
/* UL Carrier configuration */
- duCfgParam.clCellCfg.ulCarrCfg.pres = TRUE;
- duCfgParam.clCellCfg.ulCarrCfg.bw = SUL_ARFCN;
- duCfgParam.clCellCfg.ulCarrCfg.freq = NR_ARFCN;
- duCfgParam.clCellCfg.ulCarrCfg.k0[0] = 1;
- duCfgParam.clCellCfg.ulCarrCfg.k0[1] = 1;
- duCfgParam.clCellCfg.ulCarrCfg.k0[2] = 1;
- duCfgParam.clCellCfg.ulCarrCfg.k0[3] = 1;
- duCfgParam.clCellCfg.ulCarrCfg.k0[4] = 1;
- duCfgParam.clCellCfg.ulCarrCfg.gridSize[0] = 1;
- duCfgParam.clCellCfg.ulCarrCfg.gridSize[1] = 1;
- duCfgParam.clCellCfg.ulCarrCfg.gridSize[2] = 1;
- duCfgParam.clCellCfg.ulCarrCfg.gridSize[3] = 1;
- duCfgParam.clCellCfg.ulCarrCfg.gridSize[4] = 1;
- duCfgParam.clCellCfg.ulCarrCfg.numAnt = NUM_RX_ANT;
-
- duCfgParam.clCellCfg.freqShft = FREQ_SHIFT_7P5KHZ;
+ duCfgParam.macCellCfg.ulCarrCfg.pres = TRUE;
+ duCfgParam.macCellCfg.ulCarrCfg.bw = SUL_ARFCN;
+ duCfgParam.macCellCfg.ulCarrCfg.freq = NR_ARFCN;
+ duCfgParam.macCellCfg.ulCarrCfg.k0[0] = 1;
+ duCfgParam.macCellCfg.ulCarrCfg.k0[1] = 1;
+ duCfgParam.macCellCfg.ulCarrCfg.k0[2] = 1;
+ duCfgParam.macCellCfg.ulCarrCfg.k0[3] = 1;
+ duCfgParam.macCellCfg.ulCarrCfg.k0[4] = 1;
+ duCfgParam.macCellCfg.ulCarrCfg.gridSize[0] = 1;
+ duCfgParam.macCellCfg.ulCarrCfg.gridSize[1] = 1;
+ duCfgParam.macCellCfg.ulCarrCfg.gridSize[2] = 1;
+ duCfgParam.macCellCfg.ulCarrCfg.gridSize[3] = 1;
+ duCfgParam.macCellCfg.ulCarrCfg.gridSize[4] = 1;
+ duCfgParam.macCellCfg.ulCarrCfg.numAnt = NUM_RX_ANT;
+
+ duCfgParam.macCellCfg.freqShft = FREQ_SHIFT_7P5KHZ;
/* SSB configuration */
- duCfgParam.clCellCfg.ssbCfg.ssbPbchPwr = SSB_PBCH_PWR;
- duCfgParam.clCellCfg.ssbCfg.bchPayload = BCH_PAYLOAD;
- duCfgParam.clCellCfg.ssbCfg.scsCmn = SUBCARRIER_SPACING;
- duCfgParam.clCellCfg.ssbCfg.ssbPrbOffset = PRB_OFFSET;
- duCfgParam.clCellCfg.ssbCfg.betaPss = BETA_PSS;
- duCfgParam.clCellCfg.ssbCfg.ssbPeriod = SSB_PERIODICITTY;
- duCfgParam.clCellCfg.ssbCfg.ssbSubcOffset = SSB_SUBCARRIER_OFFSET;
- duCfgParam.clCellCfg.ssbCfg.mibPdu = 104;
- duCfgParam.clCellCfg.ssbCfg.nSSBMask[0] = 2162721;
- duCfgParam.clCellCfg.ssbCfg.nSSBMask[1] = 0;
- duCfgParam.clCellCfg.ssbCfg.multCarrBand = SSB_MULT_CARRIER_BAND;
- duCfgParam.clCellCfg.ssbCfg.multCellCarr = MULT_CELL_CARRIER;
+ duCfgParam.macCellCfg.ssbCfg.ssbPbchPwr = SSB_PBCH_PWR;
+ duCfgParam.macCellCfg.ssbCfg.bchPayloadOption = BCH_PAYLOAD;
+ duCfgParam.macCellCfg.ssbCfg.scsCmn = SUBCARRIER_SPACING;
+ duCfgParam.macCellCfg.ssbCfg.ssbPrbOffset = PRB_OFFSET;
+ duCfgParam.macCellCfg.ssbCfg.betaPss = BETA_PSS;
+ duCfgParam.macCellCfg.ssbCfg.ssbPeriod = SSB_PERIODICITTY;
+ duCfgParam.macCellCfg.ssbCfg.ssbSubcOffset = SSB_SUBCARRIER_OFFSET;
+ duCfgParam.macCellCfg.ssbCfg.mibPdu = 104;
+ duCfgParam.macCellCfg.ssbCfg.nSSBMask[0] = 2162721;
+ duCfgParam.macCellCfg.ssbCfg.nSSBMask[1] = 0;
+ duCfgParam.macCellCfg.ssbCfg.multCarrBand = SSB_MULT_CARRIER_BAND;
+ duCfgParam.macCellCfg.ssbCfg.multCellCarr = MULT_CELL_CARRIER;
/* PRACH configuration */
- duCfgParam.clCellCfg.prachCfg.pres = TRUE;
- duCfgParam.clCellCfg.prachCfg.prachSeqLen = PRACH_SEQ_LEN;
- duCfgParam.clCellCfg.prachCfg.prachSubcSpacing = PRACH_SUBCARRIER_SPACING;
- duCfgParam.clCellCfg.prachCfg.prachRstSetCfg = PRACH_RESTRICTED_SET_CFG;
- duCfgParam.clCellCfg.prachCfg.prachFdm = NUM_PRACH_FDM;
- duCfgParam.clCellCfg.prachCfg.fdm[0].rootSeqIdx = ROOT_SEQ_IDX;
- duCfgParam.clCellCfg.prachCfg.fdm[0].numRootSeq = NUM_ROOT_SEQ;
- duCfgParam.clCellCfg.prachCfg.fdm[0].k1 = 1;
- duCfgParam.clCellCfg.prachCfg.fdm[0].zeroCorrZoneCfg = ZERO_CORRELATION_ZONE_CFG;
- duCfgParam.clCellCfg.prachCfg.fdm[0].numUnusedRootSeq = NUM_UNUSED_ROOT_SEQ;
- DU_ALLOC(duCfgParam.clCellCfg.prachCfg.fdm[0].unsuedRootSeq, NUM_UNUSED_ROOT_SEQ * sizeof(U8));
- if(duCfgParam.clCellCfg.prachCfg.fdm[0].unsuedRootSeq == NULLP)
+ duCfgParam.macCellCfg.prachCfg.pres = TRUE;
+ duCfgParam.macCellCfg.prachCfg.prachSeqLen = PRACH_SEQ_LEN;
+ duCfgParam.macCellCfg.prachCfg.prachSubcSpacing = PRACH_SUBCARRIER_SPACING;
+ duCfgParam.macCellCfg.prachCfg.prachRstSetCfg = PRACH_RESTRICTED_SET_CFG;
+ duCfgParam.macCellCfg.prachCfg.prachFdm = NUM_PRACH_FDM;
+ duCfgParam.macCellCfg.prachCfg.fdm[0].rootSeqIdx = ROOT_SEQ_IDX;
+ duCfgParam.macCellCfg.prachCfg.fdm[0].numRootSeq = NUM_ROOT_SEQ;
+ duCfgParam.macCellCfg.prachCfg.fdm[0].k1 = 1;
+ duCfgParam.macCellCfg.prachCfg.fdm[0].zeroCorrZoneCfg = ZERO_CORRELATION_ZONE_CFG;
+ duCfgParam.macCellCfg.prachCfg.fdm[0].numUnusedRootSeq = NUM_UNUSED_ROOT_SEQ;
+ DU_ALLOC(duCfgParam.macCellCfg.prachCfg.fdm[0].unsuedRootSeq, NUM_UNUSED_ROOT_SEQ * sizeof(U8));
+ if(duCfgParam.macCellCfg.prachCfg.fdm[0].unsuedRootSeq == NULLP)
{
DU_LOG("\nDU_APP : Memory allocation failed");
RETVALUE(RFAILED);
}
- *(duCfgParam.clCellCfg.prachCfg.fdm[0].unsuedRootSeq) = UNUSED_ROOT_SEQ;
- duCfgParam.clCellCfg.prachCfg.ssbPerRach = SSB_PER_RACH;
- duCfgParam.clCellCfg.prachCfg.prachMultCarrBand = PRACH_MULT_CARRIER_BAND;
+ *(duCfgParam.macCellCfg.prachCfg.fdm[0].unsuedRootSeq) = UNUSED_ROOT_SEQ;
+ duCfgParam.macCellCfg.prachCfg.ssbPerRach = SSB_PER_RACH;
+ duCfgParam.macCellCfg.prachCfg.prachMultCarrBand = PRACH_MULT_CARRIER_BAND;
/* TDD configuration */
- duCfgParam.clCellCfg.tddCfg.pres = TRUE;
- duCfgParam.clCellCfg.tddCfg.tddPeriod = TDD_PERIODICITY;
+ duCfgParam.macCellCfg.tddCfg.pres = TRUE;
+ duCfgParam.macCellCfg.tddCfg.tddPeriod = TDD_PERIODICITY;
FillSlotConfig();
/* RSSI Measurement configuration */
- duCfgParam.clCellCfg.rssiUnit = RSS_MEASUREMENT_UNIT;
+ duCfgParam.macCellCfg.rssiUnit = RSS_MEASUREMENT_UNIT;
/* This should be calculated based on
(number of mandatory parameters) + (number of otional parameters being filled) */
- duCfgParam.clCellCfg.numTlv = 39;
+ duCfgParam.macCellCfg.numTlv = 39;
RETVALUE(ROK);
}
*
* Functionality:
* - Initializes the DuCfg members.
- * - Calls readClCfg()
+ * - Calls readMacCfg()
*
* @params[in] system task ID
* @return ROK - success
}
- if(readClCfg() != ROK)
+ if(readMacCfg() != ROK)
{
- DU_LOG("\nDU_APP : Failed while reading CL config");
+ DU_LOG("\nDU_APP : Failed while reading MAC config");
RETVALUE(RFAILED);
}
#define __DU_CONFIG_H__
#include "du_mgr.h"
-#include "lcl.h"
+#include "mac_interface.h"
#include "du_log.h"
#include "BIT_STRING.h"
CellCfgParams cellCfg[DU_MAX_CELLS]; /* Cell info config*/
F1DuSrvdCellInfo srvdCellLst[DU_MAX_CELLS]; /* Serving cell list *///TODO: this must be removed eventually
F1RrcVersion rrcVersion; /* RRC version */
- ClCellCfg clCellCfg; /* CL cell configuration */
+
+ MacCellCfg macCellCfg; /* MAC cell configuration */
MibParams mibParams; /* MIB Params */
Sib1Params sib1Params; /* SIB1 Params */
}DuCfgParams;
#include "lkw.h"
#include "lrg.h"
#include "legtp.h"
-
+#include "mac_interface.h"
#include "gen.x" /* General */
#include "ssi.x" /* System services */
Bool f1Status; /* Status of F1 connection */
CmHashListCp cellLst; /* List of cells at DU APP of type DuCellCb */
CmHashListCp actvCellLst; /* List of cells activated/to be activated of type DuCellCb */
+ /* pointer to store the address of macCellCfg params used to send du-app to MAC */
+ MacCellCfg *ptrMacCellCfg; /* pointer to store params while sending DU-APP to MAC */
}DuCb;
#include "du_f1ap_msg_hdl.h"
#include "lsctp.h"
#include "legtp.h"
+#include "mac_interface.h"
extern S16 cmUnpkLkwCfgCfm(LkwCfgCfm func,Pst *pst, Buffer *mBuf);
extern S16 cmUnpkLkwCntrlCfm(LkwCntrlCfm func,Pst *pst, Buffer *mBuf);
ret = cmUnpkLrgSchCfgCfm(duHdlSchCfgComplete, pst, mBuf);
break;
}
-
+ case EVENT_MAC_CELL_CONFIG_CFM:
+ {
+ ret = cmUnpackLcMacCellCfgCfm(duHandleMacCellCfgCfm, pst, mBuf);
+ break;
+ }
default:
{
DU_LOG("\nDU_APP : Invalid event received at duActvTsk from ENTRG");
extern S16 cmPkLkwCntrlReq(Pst *pst, KwMngmt *cfg);
extern S16 cmPkLrgCfgReq(Pst *pst, RgMngmt *cfg);
+packMacCellCfgReq packMacCellCfgMt[] =
+{
+ packLcMacCellCfg, /* packing for loosely coupled */
+ packTcMacCellCfg, /* packing for tightly coupled */
+ packLwLcMacCellCfg, /* packing for light weight loosly coupled */
+};
+
/**************************************************************************
* @brief Function to fill configs required by RLC
*
RETVALUE(ROK);
}
+
+/**************************************************************************
+ * @brief Function to fill and send MacCellconfig
+ *
+ * @details
+ *
+ * Function : duBuildAndSendMacCellCfg
+ *
+ * Functionality:
+ * Initiates MAC Configs towards MAC
+ *
+ * @param[in] void
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ ***************************************************************************/
+S16 duBuildAndSendMacCellCfg()
+{
+ Pst pst;
+ DU_SET_ZERO(&pst, sizeof(Pst));
+ MacCellCfg *pMacCellCfg = NULLP;
+
+ DU_ALLOC(pMacCellCfg, sizeof(MacCellCfg));
+ if(pMacCellCfg == NULLP)
+ {
+ return RFAILED;
+ }
+
+ /* store the address in the duCb so that we can free on confirm msg */
+ duCb.ptrMacCellCfg = pMacCellCfg;
+
+ /* copy the mac config structure from duCfgParams */
+ memcpy(pMacCellCfg,&duCfgParam.macCellCfg,sizeof(MacCellCfg));
+
+ pMacCellCfg->transId = cmGetTransId(); /* transaction ID */
+
+ /* Fill Pst */
+ pst.selector = DU_SELECTOR_LWLC;
+ pst.srcEnt = ENTDUAPP;
+ pst.dstEnt = ENTRG;
+ pst.dstInst = 0;
+ pst.srcInst = 0;
+ pst.dstProcId = DU_PROC;
+ pst.srcProcId = DU_PROC;
+ pst.region = duCb.init.region;
+ pst.event = EVENT_MAC_CELL_CONFIG_REQ;
+
+ /* Send MAC cell config to MAC */
+ return (*packMacCellCfgMt[pst.selector])(&pst, pMacCellCfg);
+}
+
+/**************************************************************************
+ * @brief Function to Handle MAC cell config confirm
+ *
+ * @details
+ *
+ * Function : duHandleMacCellCfgCfm
+ *
+ * Functionality:
+ * Initiates general Configs towards MAC
+ *
+ * @param[in] void
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ ***************************************************************************/
+S16 duHandleMacCellCfgCfm(MacCellCfgCfm *macCellCfgCfm)
+{
+ S16 ret = ROK;
+
+ if(macCellCfgCfm->transId == duCb.ptrMacCellCfg->transId)
+ {
+ /* free the memory allocated during sending macCellCfg request */
+ DU_FREE(duCb.ptrMacCellCfg,sizeof(MacCellCfg));
+ duCb.ptrMacCellCfg = NULLP;
+
+ /* Build and send GNB-DU config update */
+ ret = BuildAndSendDUConfigUpdate();
+ }
+ else
+ {
+ /* transaction ID missmatch */
+ DU_LOG("\n transaction ID mismatch in macCellCfg");
+ ret = RFAILED;
+ }
+
+ return ret;
+}
+
/**********************************************************************
End of file
**********************************************************************/