+//------------------------------------------------------------------------------
+/** @ingroup nr5g_fapi_source_framework_wls_fapi2phy_group
+ *
+ * @param void
+ *
+ * @return Pointer to the memory block
+ *
+ * @description
+ * This function allocates a block of memory from the pool
+ *
+**/
+//------------------------------------------------------------------------------
+void nr5g_fapi_fapi2mac_wls_free_buffer(
+ void *buffers)
+{
+ p_nr5g_fapi_wls_context_t p_wls_ctx = nr5g_fapi_wls_context();
+
+ if (pthread_mutex_lock((pthread_mutex_t *) &
+ p_wls_ctx->fapi2mac_lock_alloc)) {
+ NR5G_FAPI_LOG(ERROR_LOG, ("unable to lock alloc pthread mutex"));
+ return;
+ }
+ if (p_fapi2mac_buffers) {
+ ((p_fapi_api_queue_elem_t) buffers)->p_next = p_fapi2mac_buffers;
+ p_fapi2mac_buffers = (p_fapi_api_queue_elem_t) buffers;
+ } else {
+ p_fapi2mac_buffers = (p_fapi_api_queue_elem_t) buffers;
+ p_fapi2mac_buffers->p_next = NULL;
+ }
+
+ if (pthread_mutex_unlock((pthread_mutex_t *) &
+ p_wls_ctx->fapi2mac_lock_alloc)) {
+ NR5G_FAPI_LOG(ERROR_LOG, ("unable to unlock alloc pthread mutex"));
+ return;