/* Allocate and store an event in the event queue.  */
static struct net_buf* queue_event(struct net_buf *buf)
/* Allocate and store an event in the event queue.  */
static struct net_buf* queue_event(struct net_buf *buf)
{
	struct net_buf *evt;
	evt = net_buf_alloc(&event_pool, K_NO_WAIT);
	if (evt) {
		bt_buf_set_type(evt, BT_BUF_EVT);
		net_buf_add_le32(evt, sys_cpu_to_le32(k_uptime_get()));
		net_buf_add_mem(evt, buf->data, buf->len);
		net_buf_put(&event_queue, evt);
		m_events++;
	}
	return evt;
}