Received: by 2002:ab2:7988:0:b0:1f4:b336:87c4 with SMTP id g8csp111768lqj; Thu, 11 Apr 2024 11:15:20 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVL2nUrh0EXKJapGpbabgsbO5+YwPoBEyzaO82mMaBDwNVdgZ2r5RuY03iGjerR3FxCyWWMPissfkTllF4KdRKTJavIrbS1uEpdZxw8dg== X-Google-Smtp-Source: AGHT+IEGVF9z5FPJrTsRfEZ0VXJpgAB5QVCkuuHTv7i4xRuhZLDml/lqP1+fd3oq35GIVWlGjJ4e X-Received: by 2002:a17:90a:d985:b0:2a6:217b:4492 with SMTP id d5-20020a17090ad98500b002a6217b4492mr611651pjv.3.1712859320091; Thu, 11 Apr 2024 11:15:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712859320; cv=pass; d=google.com; s=arc-20160816; b=WBwBsieL+QO2j5Dlsk/g7lg5+1UiJTVbZH6U7ck67qkpzQpbXU6eEPnsDEn1l1xHs4 uxCXA6/UTqiR7cAjcL5yaiNUaHM04JdDJ95Ex24S0oDLwLoIEPs9f23oasgEhDEYj/1O LNWDcCX/iG/P7SsciEmetyj7jWhMzKnN/enEQNaUJW9vsY5hyPB0oU87wuENbaoD/Q1U 7ErpA27geBLJ0Xj7KJh3+uR0UAfhnHQ9yS+Q+SI7r9bjhLaieVkNjf2nkPW04tCw8lfd 9RHwoVN/iJgScmZw/RBWYnG2eaJEPbnAlpFUZ679sHX9Tg2/7QmelHc6lFsPRkUft0AP szxQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:to:from :dkim-signature; bh=+hANOqpWi5mccCXObOolBPcIhoSeVd6fCezYfr1BhRY=; fh=4lGQI6056MBa4/oovMyIYaKLn+Wz/24RGvUivMmQP8E=; b=dou5HNSBzb8+0QF59ZgW8f7UcSKg1AiYA2nQALOx7xenzkzqezULgcKtWkcMRyCL3T mSqvAOgnR0/zMXGTAYYo9VvjKCiM1/Xv6ZU4fIGmCY623JFeML8WtkOc/NTXJeJUfFxH Jrr3vNQboK6+/CKwH146vjE/VemgHB/lQC/u5+QsKJxbV+wdbgnP2jjeXxRfUmcWQePv 5Qr6M+qrg4P0jJIcVSmxBXD7efSPzc+PWteLtX1yZEbhcwhAtmBJYFdGD5jU90A9K+xS 0MKup8kLLjDwwYZCc9NOWHf1Ms+gR38YV9uzvzKeDbYsFKvgBEhEhYVzU9kMi2Y/4tf7 vTTw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=dOzTlkNL; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-bluetooth+bounces-3488-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-3488-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id qc2-20020a17090b288200b002a5056532dfsi1758700pjb.189.2024.04.11.11.15.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 11:15:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-3488-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=dOzTlkNL; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-bluetooth+bounces-3488-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-3488-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 14EC7B250E8 for ; Thu, 11 Apr 2024 17:52:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5B60513C9AF; Thu, 11 Apr 2024 16:30:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="dOzTlkNL" X-Original-To: linux-bluetooth@vger.kernel.org Received: from mail-vs1-f51.google.com (mail-vs1-f51.google.com [209.85.217.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 76F443C478 for ; Thu, 11 Apr 2024 16:30:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.217.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712853046; cv=none; b=SgMOdc/vFvXJqsz9RBoCGraWt5i/WliT6fyJ+HSMCQS/hpIW1PnL+egJM9qKpZH8EHj0VONtnvkpqgXgG75Mw6NbOBAJiqGVOEMrRvXiV8peV4mlKWMXcUbsXYFgbM4X2OYDb0+MOypiTVvmgvjbVPHNzDxzlKzQ7avOwPkcMw0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712853046; c=relaxed/simple; bh=2zd2aErHG1lZPkrmYGGNWy8rR9E2GG4suFCJDjI8SaE=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=r9gO6BJjFHpH1qZJbIQSiBN/rR6BXhj3MAxSNBnARqkdVk5Zgee2kRB9QAX+cvB3Ava07khPQP3k3NER39n7AfG82RN5spqlesvZ79icpEpE6BWXH39LO08Ls43Lk6mccAjDktetuQmYpZl5y86ifPsg3BCACnZISQIk5MMsEZE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=dOzTlkNL; arc=none smtp.client-ip=209.85.217.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-vs1-f51.google.com with SMTP id ada2fe7eead31-479d6c6f2c0so598071137.1 for ; Thu, 11 Apr 2024 09:30:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712853044; x=1713457844; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=+hANOqpWi5mccCXObOolBPcIhoSeVd6fCezYfr1BhRY=; b=dOzTlkNLhTYYrtp3cm0C/h/fj1LyvTzRM3MgBQR+y2atHWrUllqZ59QViLRI9ti4aE SyDQHLnWtsSZzbicRTnfW0iAW9nWy8HBH6S5CXJ0eiMpt0426NO1du1YtrLQcp2E5Ujm gOZiOdEwYMSHe4pO7CBrLb1ILnSpQw/USLZJa/TwPgvzQXvZvbg+eDLBQaKoRPwPF2r3 zWGxOxKsobrR4eWlkN2fgyRB9X+a7Q7y0oVsABO4lq1vblDurI3IG8TKt+i1nJPG64Dp wvAhIvFzYJuBXNr2Ck+OW7UwRJ9oRKxJJOW8Udkrg2a9nQE2UJS8UOohweblqw6Pg9ZX fRDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712853044; x=1713457844; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=+hANOqpWi5mccCXObOolBPcIhoSeVd6fCezYfr1BhRY=; b=TKbKUjPWdtRYHDAobutgwecgiTgOkfCCb4GeBTLJ/a1A7f+C+7xsVUj3wWUDDnow5G Bx3oNz95K2D7WHuvFzglfI0VVaKYbVNZGW/1BzECX5p6Yvxv86mLcNVXmUQ5eBUEyMtB VeKnQA+1XK9M5LSLVIUzVttPYn3bDH+o0rndThuZy0a/vFkkQGD+dO5HL1zPrgQBZbDl rWl51MWRdSe+7KwrpI/6GnL18Z6deBhlgeEtZStQnI0V3z01e7BXp0Lu3KT3LVl6uKrL EN7IjUopDOTT5CeZk1jcj+a4MPiK9CvoDvIVgqcoTKPa3i5NRaQIdtVPGJUcUNlXBNJp tyoQ== X-Gm-Message-State: AOJu0YyI0NyxHiDwKx/+yf9+3fa8cocHFYKTHCVOcBGeSvNUHjbMd1K6 bq2zB7sd/XdKvKYdwxRax5R/+QF4y8Lc1bbRvMMph8AZVi45pHM4Heqn7A== X-Received: by 2002:a67:e285:0:b0:47a:35a6:cf90 with SMTP id g5-20020a67e285000000b0047a35a6cf90mr1572603vsf.14.1712853043681; Thu, 11 Apr 2024 09:30:43 -0700 (PDT) Received: from lvondent-mobl4.. (107-146-107-067.biz.spectrum.com. [107.146.107.67]) by smtp.gmail.com with ESMTPSA id ih12-20020a0561022d0c00b0047a1d8d2230sm294159vsb.2.2024.04.11.09.30.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 09:30:43 -0700 (PDT) From: Luiz Augusto von Dentz To: linux-bluetooth@vger.kernel.org Subject: [PATCH BlueZ v2 1/2] shared/bap: Fix not updating location Date: Thu, 11 Apr 2024 12:30:40 -0400 Message-ID: <20240411163041.130214-1-luiz.dentz@gmail.com> X-Mailer: git-send-email 2.44.0 Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Luiz Augusto von Dentz Fix not updating map.location when selecting. --- src/shared/bap.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/shared/bap.c b/src/shared/bap.c index f553096dfcc6..b452461ac715 100644 --- a/src/shared/bap.c +++ b/src/shared/bap.c @@ -5163,12 +5163,10 @@ int bt_bap_select(struct bt_bap_pac *lpac, struct bt_bap_pac *rpac, /* Check if there are any channels left to select */ map.count &= ~(map.count & rc->count); - if (!map.count) - break; - /* Check if there are any locations left to select */ map.location &= ~(map.location & rc->location); - if (!map.location) + + if (!map.count || !map.location) break; /* Check if device require AC*(i) settings */ -- 2.44.0