X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2F5gnrmac%2Frg_cl_phy_inf.c;fp=src%2F5gnrmac%2Frg_cl_phy_inf.c;h=250bec82185b9f52f3114110a8746ad4ea8a1769;hb=829bbd114f1c3dc00c1da47bca0a8207c049df3f;hp=0000000000000000000000000000000000000000;hpb=9ffd4692faec97b8457ef0428549b7bfa7a6bb82;p=o-du%2Fl2.git diff --git a/src/5gnrmac/rg_cl_phy_inf.c b/src/5gnrmac/rg_cl_phy_inf.c new file mode 100644 index 000000000..250bec821 --- /dev/null +++ b/src/5gnrmac/rg_cl_phy_inf.c @@ -0,0 +1,103 @@ +/******************************************************************************* +################################################################################ +# 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. # +################################################################################ +*******************************************************************************/ + +/* This file contains APIs to send/receive messages from PHY */ + +#include "stdio.h" +#include "envdep.h" +#include "ssi.h" + +#include "rg_cl_phy.h" + + +EXTERN S16 rgClHndlCfgReq ARGS((void *msg)); +EXTERN void macToPhy ARGS((U16 msgType, U32 msgLen, void *msg)); + +/****************************************************************** + * + * @brief Receives message to PHY + * + * @details + * + * Function : phyToMac + * + * Functionality: + * -Receives Msg from PHY + * + * @params[in] Message Pointer + * + * @return void + * + ******************************************************************/ + +void phyToMac(U16 msgType, U32 msgLen,void *msg) +{ + switch(msgType) + { + case MSG_TYPE_CONFIG_RSP: + rgClHndlCfgReq(msg); + break; + + default: + printf("\nInvalid message type[%x] from PHY", msgType); + } +} + +/******************************************************************* + * + * @brief Sends message to PHY + * + * @details + * + * Function : sendToPhy + * + * Functionality: + * -Sends message to PHY + * + * @params[in] Message Type + * Message Length + * Messaga Pointer + * + * @return void + * +******************************************************************/ + +PUBLIC S16 sendToPhy(U16 msgType, U32 msgLen, void *msg) +{ +#if 0 + S8 ret; + void *pMsg; + + pMsg = (void *)WLS_VA2PA(mtGetWlsHdl(), msg); + ret = WLS_put(mtGetWlsHdl(), (PTR)pMsg, msgLen, msgType, 0); + + if(ret != 0) + { + printf("\nFailure in sending message to PHY"); + RETVALUE(RFAILED); + } +#endif + + macToPhy(msgType, msgLen, msg); + + RETVALUE(ROK); +} + +/********************************************************************** + End of file +**********************************************************************/