#ifdef EMTC_ENABLE
U8 emtcEnable;
#endif
+ /* 5GNR changes */
+ MacCellCfg macCellCfg; /* MAC cell config paramters */
};
/**
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 */
#endif /* LCRGMILRG */
case EVENT_MAC_CELL_CONFIG_REQ:
/* Process MAC cell config */
- cmUnpackLwLcMacCellCfg(unpackMacCellCfgReq, pst, mBuf);
+ unpackDuMacCellCfg(handleMacCellCfgReq, pst, mBuf);
break;
default:
RG_FREE_MSG(mBuf);
));
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 */
+ duHandleMacCellCfgCfm, /* packing for tightly coupled */
cmPackLwlcMacCellCfgCfm, /* packing for light weight loosly coupled */
};
\f
*
* @details
*
- * Function : unpackMacCellCfgReq
+ * Function : handleMacCellCfgReq
*
* This function handles the gNB and cell configuration
* request received from DU APP.
* @return S16
* -# ROK
**/
-S16 unpackMacCellCfgReq
+S16 handleMacCellCfgReq
(
Pst *pst,
MacCellCfg *macCellCfg
{
U16 ret = ROK;
MacCellCfgCfm macCellCfgCfm;
+ RgCellCb *cellCb;
Pst cnfPst;
Inst inst = pst->dstInst;
- memcpy(&rgCb[inst].macCellCfg,macCellCfg,sizeof(MacCellCfg));
+ cellCb = rgCb[inst].cell;
+ memcpy(&cellCb->macCellCfg,macCellCfg,sizeof(MacCellCfg));
macCellCfgFillCfmPst(pst,&cnfPst);
//ret = cmPackLcMacCellCfgCfm(&cnfPst,&macCellCfgCfm);
ret = (*packMacCellCfmMt[cnfPst.selector])(&cnfPst,&macCellCfgCfm);
return ret;
-} /* end of unpackMacCellCfgReq */
+} /* end of handleMacCellCfgReq */
\f
/**********************************************************************
/*
*
-* Fun: cmGetTransId
+* Fun: getTransId
*
* Desc: This function return the transaction ID used for interface transactions
*
* File: cm_gen.c
*
*/
-U16 cmGetTransId()
+U16 getTransId()
{
- if(gTransId<65535)
- gTransId++;
- else
- gTransId = 0;
+ gTransId = (gTransId%65535) + 1;
return gTransId;
}
/**********************************************************************
#include "ss_queue.h"
#include "ss_task.h"
#include "ss_msg.h"
+#include "du_cfg.h"
+
#include "gen.x" /* general */
#include "ssi.x" /* system services */
#include "cm_tkns.x" /* Common Token Definitions */
***************************************************************************/
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)
-{
+ /* we are now implemented only light wieght lossely coupled interface */
return ROK;
}
*
* @details
*
- * Function : unpackLwLcMacCellCfg
+ * Function : unpackDuMacCellCfg
*
* Functionality:
* packs the macCellCfg parameters
* RFAILED - failure
*
***************************************************************************/
-void cmUnpackLwLcMacCellCfg(
+void unpackDuMacCellCfg(
DuMacCellCfgReq func,
Pst *pst,
Buffer *mBuf)
{
+ U16 ret = ROK;
MacCellCfg *macCellCfg;
- /* unpack the address of the structure */
- CMCHKUNPK(cmUnpkPtr, (PTR *)&macCellCfg, mBuf);
-
- RETVALUE((*func)(pst, macCellCfg));
+ if(pst->selector == DU_SELECTOR_LWLC)
+ {
+ /* unpack the address of the structure */
+ CMCHKUNPK(cmUnpkPtr, (PTR *)&macCellCfg, mBuf);
+ ret = (*func)(pst, macCellCfg);
+ }
+ else
+ {
+ /* only LWLC is implemented now */
+ ret = ROK;
+ }
+
+ return ret;
}
/**************************************************************************
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 : cmUnpackLcMacCellCfgCfm
+ * Function : unpackMacCellCfgCfm
*
* Functionality:
* packs the transaction ID
* RFAILED - failure
*
***************************************************************************/
-S16 cmUnpackLcMacCellCfgCfm(
+S16 unpackMacCellCfgCfm(
DuMacCellCfgCfm func,
Pst *pst,
Buffer *mBuf)
{
MacCellCfgCfm macCellCfgCfm;
- /* pack the transaction ID in CNF structure */
- CMCHKUNPK(SUnpkU16, &(macCellCfgCfm.transId), mBuf);
- RETVALUE((*func)(&macCellCfgCfm));
+ if(pst->selector == DU_SELECTOR_LC)
+ {
+ /* unpack the transaction ID in CNF structure */
+ CMCHKUNPK(SUnpkU16, &(macCellCfgCfm.transId), mBuf);
+
+ RETVALUE((*func)(&macCellCfgCfm));
+ }
+ else
+ {
+ /* only loose coupling is suported */
+ }
}
typedef struct macCellCfg
{
U16 transId;
+ U16 cellId; /* Cell Id */
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 */
));
S16 packLcMacCellCfg(Pst *pst, MacCellCfg *macCellCfg);
-
-S16 packTcMacCellCfg(Pst *pst, MacCellCfg *macCellCfg);
-
S16 packLwLcMacCellCfg(Pst *pst, MacCellCfg *macCellCfg);
-EXTERN S16 unpackMacCellCfgReq
+EXTERN S16 handleMacCellCfgReq
(
Pst *pst,
MacCellCfg *macCellCfg
Pst *pst,
Buffer *mBuf);
-S16 cmUnpackLcMacCellCfgCfm(
+S16 unpackMacCellCfgCfm(
DuMacCellCfgCfm func,
Pst *pst,
Buffer *mBuf);
}
case EVENT_MAC_CELL_CONFIG_CFM:
{
- ret = cmUnpackLcMacCellCfgCfm(duHandleMacCellCfgCfm, pst, mBuf);
+ ret = unpackMacCellCfgCfm(duHandleMacCellCfgCfm, pst, mBuf);
break;
}
default:
packMacCellCfgReq packMacCellCfgMt[] =
{
packLcMacCellCfg, /* packing for loosely coupled */
- packTcMacCellCfg, /* packing for tightly coupled */
+ handleMacCellCfgReq, /* packing for tightly coupled */
packLwLcMacCellCfg, /* packing for light weight loosly coupled */
};
/* copy the mac config structure from duCfgParams */
memcpy(pMacCellCfg,&duCfgParam.macCellCfg,sizeof(MacCellCfg));
- pMacCellCfg->transId = cmGetTransId(); /* transaction ID */
+ pMacCellCfg->transId = getTransId(); /* transaction ID */
/* Fill Pst */
pst.selector = DU_SELECTOR_LWLC;