Code Review
/
o-du
/
l2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Fix for seg fault at 5th and 20th slot and SIB1
[o-du/l2.git]
/
src
/
5gnrmac
/
lwr_mac_handle_phy.c
diff --git
a/src/5gnrmac/lwr_mac_handle_phy.c
b/src/5gnrmac/lwr_mac_handle_phy.c
index
710b24b
..
b46739b
100644
(file)
--- a/
src/5gnrmac/lwr_mac_handle_phy.c
+++ b/
src/5gnrmac/lwr_mac_handle_phy.c
@@
-28,7
+28,6
@@
#include "cm_lte.h" /* Common LTE Defines */
#include "cm_mblk.h" /* Common LTE Defines */
#include "tfu.h" /* RGU Interface defines */
#include "cm_lte.h" /* Common LTE Defines */
#include "cm_mblk.h" /* Common LTE Defines */
#include "tfu.h" /* RGU Interface defines */
-//#include "rg.h"
#ifdef FAPI
#include "fapi.h"
#endif
#ifdef FAPI
#include "fapi.h"
#endif
@@
-43,20
+42,21
@@
#include "cm_lte.x" /* Common LTE Defines */
#include "cm_mblk.x" /* Common LTE Defines */
#include "tfu.x" /* RGU Interface includes */
#include "cm_lte.x" /* Common LTE Defines */
#include "cm_mblk.x" /* Common LTE Defines */
#include "tfu.x" /* RGU Interface includes */
-//#include "rg.x"
-#include "lwr_mac.h"
#include "du_log.h"
#include "du_log.h"
+#include "lwr_mac_fsm.h"
+#include "lwr_mac_phy.h"
#ifdef FAPI
#ifdef FAPI
+
/* function pointers for packing macCellCfg Request */
typedef S16 (*packSlotIndMsg) ARGS((
Pst *pst,
/* function pointers for packing macCellCfg Request */
typedef S16 (*packSlotIndMsg) ARGS((
Pst *pst,
-
fapi_slot_ind_t
*slotInd
+
SlotIndInfo
*slotInd
));
S16 packLcSlotInd (Pst *pst, SlotIndInfo *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);
+S16 packTcSlotInd (Pst *pst,
SlotIndInfo
*slotInd);
+S16 packLwlcSlotInd (Pst *pst,
SlotIndInfo
*slotInd);
packSlotIndMsg packSlotIndOpts[] =
{
packSlotIndMsg packSlotIndOpts[] =
{
@@
-80,12
+80,12
@@
S16 packLcSlotInd (Pst *pst, SlotIndInfo *slotInd)
RETVALUE(SPstTsk(pst,mBuf));
}
RETVALUE(SPstTsk(pst,mBuf));
}
-S16 packTcSlotInd (Pst *pst,
fapi_slot_ind_t
*slotInd)
+S16 packTcSlotInd (Pst *pst,
SlotIndInfo
*slotInd)
{
return ROK;
}
{
return ROK;
}
-S16 packLwlcSlotInd (Pst *pst,
fapi_slot_ind_t
*slotInd)
+S16 packLwlcSlotInd (Pst *pst,
SlotIndInfo
*slotInd)
{
return ROK;
}
{
return ROK;
}
@@
-94,6
+94,7
@@
U16 handleSlotInd(fapi_slot_ind_t *fapiSlotInd)
{
/* fill Pst structure to send to lwr_mac to MAC */
Pst pst;
{
/* fill Pst structure to send to lwr_mac to MAC */
Pst pst;
+ uint16_t ret;
SlotIndInfo slotInd;
pst.srcProcId = 0;
SlotIndInfo slotInd;
pst.srcProcId = 0;
@@
-110,11
+111,22
@@
U16 handleSlotInd(fapi_slot_ind_t *fapiSlotInd)
slotInd.sfn = fapiSlotInd->sfn;
slotInd.slot = fapiSlotInd->slot;
slotInd.sfn = fapiSlotInd->sfn;
slotInd.slot = fapiSlotInd->slot;
- return (*packSlotIndOpts[pst.selector])(&pst, &slotInd);
+ ret = (*packSlotIndOpts[pst.selector])(&pst, &slotInd);
+
+#ifdef INTEL_WLS
+ slotIndIdx++;
+ if(slotIndIdx > WLS_MEM_FREE_PRD)
+ {
+ slotIndIdx = 1;
+ }
+ freeWlsBlockList(slotIndIdx - 1);
+#endif
+
+ return ret;
}
#endif
}
#endif
-void handlePhyMessages(void *msg)
+void handlePhyMessages(
uint16_t msgType, uint32_t msgSize,
void *msg)
{
#ifdef FAPI
/* extract the header */
{
#ifdef FAPI
/* extract the header */
@@
-123,6
+135,12
@@
void handlePhyMessages(void *msg)
switch(header->message_type_id)
{
switch(header->message_type_id)
{
+ case FAPI_PARAM_RESPONSE:
+ case FAPI_CONFIG_RESPONSE:
+ {
+ sendToLowerMac(msgType, msgSize, msg);
+ break;
+ }
case FAPI_SLOT_INDICATION:
{
if(clGlobalCp.phyState == PHY_STATE_CONFIGURED)
case FAPI_SLOT_INDICATION:
{
if(clGlobalCp.phyState == PHY_STATE_CONFIGURED)
@@
-161,6
+179,9
@@
void handlePhyMessages(void *msg)
break;
}
}
break;
}
}
+#ifdef INTEL_WLS
+ WLS_MEM_FREE(msg, LWR_MAC_WLS_BUF_SIZE);
+#endif
#endif
}
#endif
}