/* Extracts the Bluetooth connection from a net_buf's user data.  */
static struct bt_conn* smp_bt_conn_from_pkt(const struct net_buf *nb)
/* Extracts the Bluetooth connection from a net_buf's user data.  */
static struct bt_conn* smp_bt_conn_from_pkt(const struct net_buf *nb)
{
	struct smp_bt_user_data *ud = net_buf_user_data(nb);
	if (!ud->conn) {
		return NULL;
	}
	return ud->conn;
}