X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2F5gnrmac%2Flwr_mac_handle_phy.c;h=b46739b4c4a445dc39b265f8d6d0f291ac57d4af;hb=4fc13842d17b3cce83876c95cba9eef4b2a413dd;hp=710b24bad89d04ecccf434101433dcced8af3346;hpb=d2d9dcbd92e8f1be15dd5891aaf9ada9bc071e1a;p=o-du%2Fl2.git diff --git a/src/5gnrmac/lwr_mac_handle_phy.c b/src/5gnrmac/lwr_mac_handle_phy.c index 710b24bad..b46739b4c 100644 --- 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 "rg.h" #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 "rg.x" -#include "lwr_mac.h" #include "du_log.h" +#include "lwr_mac_fsm.h" +#include "lwr_mac_phy.h" #ifdef FAPI + /* 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 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[] = { @@ -80,12 +80,12 @@ S16 packLcSlotInd (Pst *pst, SlotIndInfo *slotInd) RETVALUE(SPstTsk(pst,mBuf)); } -S16 packTcSlotInd (Pst *pst, fapi_slot_ind_t *slotInd) +S16 packTcSlotInd (Pst *pst, SlotIndInfo *slotInd) { return ROK; } -S16 packLwlcSlotInd (Pst *pst, fapi_slot_ind_t *slotInd) +S16 packLwlcSlotInd (Pst *pst, SlotIndInfo *slotInd) { 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; + uint16_t ret; SlotIndInfo slotInd; pst.srcProcId = 0; @@ -110,11 +111,22 @@ U16 handleSlotInd(fapi_slot_ind_t *fapiSlotInd) 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 -void handlePhyMessages(void *msg) +void handlePhyMessages(uint16_t msgType, uint32_t msgSize, void *msg) { #ifdef FAPI /* extract the header */ @@ -123,6 +135,12 @@ void handlePhyMessages(void *msg) 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) @@ -161,6 +179,9 @@ void handlePhyMessages(void *msg) break; } } +#ifdef INTEL_WLS + WLS_MEM_FREE(msg, LWR_MAC_WLS_BUF_SIZE); +#endif #endif }