+/* Allocate shared memory to be used for LWLC
+ * during inter-layer communication */
+#define MAC_ALLOC_SHRABL_BUF(_buf, _size) \
+{ \
+ if(SGetStaticBuffer(MAC_MEM_REGION, MAC_POOL, \
+ (Data **)&_buf, (Size) _size, 0) == ROK) \
+ { \
+ cmMemset((U8 *)(_buf), 0, _size); \
+ } \
+ else \
+ { \
+ (_buf) = NULLP; \
+ } \
+}
+
+/* Free shared memory, received through LWLC */
+#define MAC_FREE_SHRABL_BUF(_region, _pool,_buf, _size) \
+{ \
+ if (_buf != NULLP) \
+ { \
+ (Void) SPutStaticBuffer(_region, _pool, \
+ (Data *) _buf, (Size) _size, 0); \
+ _buf = NULLP; \
+ } \
+}
+