1 /*******************************************************************************
2 ################################################################################
3 # Copyright (c) [2017-2019] [Radisys] #
5 # Licensed under the Apache License, Version 2.0 (the "License"); #
6 # you may not use this file except in compliance with the License. #
7 # You may obtain a copy of the License at #
9 # http://www.apache.org/licenses/LICENSE-2.0 #
11 # Unless required by applicable law or agreed to in writing, software #
12 # distributed under the License is distributed on an "AS IS" BASIS, #
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
14 # See the License for the specific language governing permissions and #
15 # limitations under the License. #
16 ################################################################################
17 *******************************************************************************/
18 #ifndef _LWR_MAC_PHY_H_
19 #define _LWR_MAC_PHY_H_
36 #define WLS_MEM_FREE_PRD 10 /* Free memory after 10 slot ind */
37 #define LWR_MAC_WLS_BUF_SIZE 8192 /* Size of WLS memory block */
39 /* allocate static buffer from WLS memory */
40 #define WLS_MEM_ALLOC(_datPtr, _size) \
43 _ret = SGetSBufWls(0, 0, (Data **)&_datPtr, _size); \
45 memset((U8*)_datPtr, 0, _size); \
50 /* free a static buffer from WLS memory*/
51 #define WLS_MEM_FREE(_datPtr, _size) \
53 SPutSBufWls(0, 0, (Data *)_datPtr, _size);
55 typedef struct wlsBlockToFree
61 CmLListCp wlsBlockToFreeList[WLS_MEM_FREE_PRD];
62 extern uint8_t slotIndIdx;
64 EXTERN void freeWlsBlockList(uint8_t idx);
65 EXTERN void LwrMacEnqueueWlsBlock();
66 #endif /* INTEL_WLS */
68 EXTERN uint16_t LwrMacSendToPhy(uint8_t msgType, uint32_t msgLen, void *msg);
71 /**********************************************************************
73 **********************************************************************/