+/*******************************************************************************
+################################################################################
+# 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. #
+################################################################################
+*******************************************************************************/
/* header include files (.h) */
#include "envopt.h" /* environment options */
#include "cm_mblk.h" /* Common LTE Defines */
#include "tfu.h" /* RGU Interface defines */
//#include "rg.h"
+#ifdef FAPI
#include "fapi.h"
+#endif
/* header/extern include files (.x) */
#include "gen.x" /* general */
#include "cm_mblk.x" /* Common LTE Defines */
#include "tfu.x" /* RGU Interface includes */
//#include "rg.x"
+#include "lwr_mac.h"
+#include "du_log.h"
+#ifdef FAPI
/* function pointers for packing macCellCfg Request */
typedef S16 (*packSlotIndMsg) ARGS((
Pst *pst,
fapi_slot_ind_t *slotInd
));
-S16 packLcSlotInd (Pst *pst, fapi_slot_ind_t *slotInd);
+S16 packLcSlotInd (Pst *pst, SlotIndInfo *slotInd);
S16 packTcSlotInd (Pst *pst, fapi_slot_ind_t *slotInd);
S16 packLwlcSlotInd (Pst *pst, fapi_slot_ind_t *slotInd);
-packSlotIndMsg packSlotIndMt[] =
+packSlotIndMsg packSlotIndOpts[] =
{
packLcSlotInd, /* packing for loosely coupled */
fapiMacSlotInd, /* packing for tightly coupled */
packLwlcSlotInd, /* packing for light weight loosly coupled */
};
-S16 packLcSlotInd (Pst *pst, fapi_slot_ind_t *slotInd)
+S16 packLcSlotInd (Pst *pst, SlotIndInfo *slotInd)
{
Buffer *mBuf = NULLP;
if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK)
return ROK;
}
-void handleSlotInd(fapi_slot_ind_t *fapiSlotInd)
+U16 handleSlotInd(fapi_slot_ind_t *fapiSlotInd)
{
/* fill Pst structure to send to lwr_mac to MAC */
Pst pst;
slotInd.sfn = fapiSlotInd->sfn;
slotInd.slot = fapiSlotInd->slot;
- return (*packSlotIndMt[pst.selector])(&pst, &slotInd);
+ return (*packSlotIndOpts[pst.selector])(&pst, &slotInd);
}
+#endif
-void handlePhyMessages(U8 *msg)
+void handlePhyMessages(void *msg)
{
+#ifdef FAPI
/* extract the header */
fapi_msg_t *header;
header = (fapi_msg_t *)msg;
{
case FAPI_SLOT_INDICATION:
{
+ if(clGlobalCp.phyState == PHY_STATE_CONFIGURED)
+ {
+ DU_LOG("\nLOWER MAC: PHY has moved to running state \n");
+ clGlobalCp.phyState = PHY_STATE_RUNNING;
+ }
+
fapi_slot_ind_t *slotInd;
slotInd = (fapi_slot_ind_t *)msg;
handleSlotInd(slotInd);
break;
}
}
+#endif
}
+
+/**********************************************************************
+ End of file
+**********************************************************************/