Received: by 2002:ab2:7a09:0:b0:1f8:46dc:890e with SMTP id k9csp54607lqo; Wed, 15 May 2024 07:35:23 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXngCF/Jt0eEog0d+WHvW9OUIb20v6epUCX4sklGZeJB5LOBZwS+JkWXBJxF3kI3Qc2J4PYzeJuFPfYcLVQNC6XJY47qR8CR+B68AfaMQ== X-Google-Smtp-Source: AGHT+IGNQmGwstKUQJcaeKvPWfdmInW4l/vC4tBDexmLgA/FnVjS0jQe4TUohTIL9gvZifyJx2Z/ X-Received: by 2002:a05:6512:158e:b0:522:2be6:6fcd with SMTP id 2adb3069b0e04-5222be6704cmr15113366e87.25.1715783723661; Wed, 15 May 2024 07:35:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715783723; cv=pass; d=google.com; s=arc-20160816; b=YYdiEIhVYIZiydSLjdoD15Z3sKYrGhfdzqTI6nabmLX2L0AN8nQczcdN8wj5StPq+s U8vkdEE6eW5MEdDOgCjr0LtwdbriL3gmaXYVhKqU/w8HTgwNziVO0v8mo3d5vmjAchXa Gypdh0TF0LGHl9hYJmTnv+MsfV1PfgyiuNJm6ahLe2R1Qt/SCKlYOE+TC8RHzc4MI2Bq yGvfVwCXUggGnCKXwhP/O8Pos5gSChqiAxoygDDWhmZ1M1Xgfy97w0/FY5IsxdyL5fM3 CWRvoxpfhoTIZ4vJyhyJiBvCWafZvHsLnMaV7KkY+vtMCxYHf8I7M+DRWi4sk70ve1/t I6Lw== 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=CrftWPDEcb6mAAm+6I66nuTCv/3OtlWKYgkDves+hT8=; fh=4lGQI6056MBa4/oovMyIYaKLn+Wz/24RGvUivMmQP8E=; b=vgiOgJViChafprDIumyDiDfq96jkO1GbemsmKZXYorFJyEHUW5qhEaE+GA+9PWrEki aejUPWCfdz6tuxEQTvJQ6oLzj/a9Ubr5yV2ayCrAlUkXxMQHnN8qAL3J0cweFKZ4cLYP kaCRJh0b09KSoNe0IfX43SaBT1EwjqNg3l10HhH55ARgTFaCFGUnw/+gjaF1pxI+lBJA yRiMAyd+u/4ZflAkV/Vujv57lB0iTTxecMl/ovlDsj7lr8rBoRQlTSVThHUPd2aI4LfQ RFtatk3+tYm9P0c5thN99igWL/WpdYVE2J5UcuMs0gs9uXGC7qLb8mzQgpx4ufOpbL36 yu/Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=c03ZvqbV; 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-4641-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-4641-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a5a44240f2bsi534583766b.865.2024.05.15.07.35.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 07:35:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-4641-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=c03ZvqbV; 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-4641-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-4641-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 620C41F21F18 for ; Wed, 15 May 2024 14:35:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E4A84155730; Wed, 15 May 2024 14:34:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="c03ZvqbV" X-Original-To: linux-bluetooth@vger.kernel.org Received: from mail-ot1-f45.google.com (mail-ot1-f45.google.com [209.85.210.45]) (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 EA08715531A for ; Wed, 15 May 2024 14:34:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715783694; cv=none; b=j2q8TzpgrKy7v2A/Yr5j2Fb1/biEJyshep/kg6ghvQUCGfGvJvl4diFam8nk8J3cPNeyHE0ISW7DoXi53vpjkR4wNMEpopKzB7ncELX9P4n7ioe739WYti08Rlh0Jjcer4FPfD4PsxEfLob8vtNzAAhR1g2zQxNoVS8fMJDXd0k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715783694; c=relaxed/simple; bh=JLm9lzS/vn/cAwcVT3HcVW6APe8L55KK4dq0SZKyJI0=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=FyKTUZLkAcRxI1YAbZ/1b5s7GNH0zO4MIhXgXYA5JRUp/BQxlToy1XYn6KRYWIWAMX4qn59bjt1ylx61JoQAwCFrFf3+ApVkYFQe+aibJOr5QT6ksaDP/V0K5reA8dUD4uNmyOj3D3rAMgVfzm+V3qbNypDNDx1A04px2aTBQM0= 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=c03ZvqbV; arc=none smtp.client-ip=209.85.210.45 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-ot1-f45.google.com with SMTP id 46e09a7af769-6f0e2612303so3821161a34.2 for ; Wed, 15 May 2024 07:34:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715783690; x=1716388490; 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=CrftWPDEcb6mAAm+6I66nuTCv/3OtlWKYgkDves+hT8=; b=c03ZvqbVHHOkYW8Ry5+iHytdIHwCcfY87TzRUicXi5RYgLC0ZlzpB2AEYxFHeEqPhB vhmg4hnQJf5++wU9HaNPFxGJ+GX2yIUQI5SqYsJxMC4OxKEWzGhchQJ06ZE8QxYwE7J0 NPaFLKVy8pEnGYSAdeBumRBFPOnYismgZSBm4rl4zbyWlk7f1CeWzaInLTBqhYhUvRBK PwVrz35nX6nnY8drYy7Q8BSlOaahMWCLCakzwl2EXi6BzGsUH+M7U53Hv0ASVCAOvp2G Y25nr2DabtbQY2bcwDRtEoEhk9lCbYNNAGXFHVcqVWoRQ1CjBE24fbA3k1qqXQiOKrTU 6+Yg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715783690; x=1716388490; 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=CrftWPDEcb6mAAm+6I66nuTCv/3OtlWKYgkDves+hT8=; b=SfLv3/kefCXsGDfjMqhy/rykJLlkd3+8pmOmZ5nNTq0Pmmm2o1uDC8CB4T9iR6zSyc 4tWV7y3sFgAh6rQHVuWXWjHcRlVaAFHL8spEFHERvccUbytg9/e1oW8Ileipv51+hW+h XCg2zvEmqDDpjIpcoclasT/jffHaxthK41DUVWlqrG5CM//EaqdtHhyZ3LhQY33b8G1m wsCFOPBR9S3wTPpB33NCi4DSWbmRfLMvEjcaNLx3fc8Hy/yhK8p638l0pZ7VQ/VfQ4Tx bWdQPp/c/1OCbLGQmNcTn99/Hb1XYCLM9XJ2/iwqgsq9nTyZ1maW3oD6X+zIvDn/v8+h n8iA== X-Gm-Message-State: AOJu0Yw8JfctF/fz5K/ArCqcfNWXQgA4OVddlnT2/PsItUKub5SucFYa LqZWzpdS1VraCb8DCF+/vwZlV02KI0r/xAQtsjo7VWq5OCLoC8+Z3ZmyqQ== X-Received: by 2002:a05:6830:22d2:b0:6f1:23f0:7ec2 with SMTP id 46e09a7af769-6f123f080b5mr1899620a34.18.1715783690345; Wed, 15 May 2024 07:34:50 -0700 (PDT) Received: from lvondent-mobl4.. (syn-107-146-107-067.res.spectrum.com. [107.146.107.67]) by smtp.gmail.com with ESMTPSA id 71dfb90a1353d-4df994eef05sm1255328e0c.18.2024.05.15.07.34.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 07:34:49 -0700 (PDT) From: Luiz Augusto von Dentz To: linux-bluetooth@vger.kernel.org Subject: [PATCH v1] Bluetooth: hci_sync: Fix not using correct handle Date: Wed, 15 May 2024 10:34:47 -0400 Message-ID: <20240515143447.1371779-1-luiz.dentz@gmail.com> X-Mailer: git-send-email 2.45.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 When setting up an advertisement the code shall always attempt to use the handle set by the instance since it may not be equal to the instance ID. Fixes: e77f43d531af ("Bluetooth: hci_core: Fix not handling hdev->le_num_of_adv_sets=1") Signed-off-by: Luiz Augusto von Dentz --- net/bluetooth/hci_sync.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c index 353de476a5cd..d24b08a111c0 100644 --- a/net/bluetooth/hci_sync.c +++ b/net/bluetooth/hci_sync.c @@ -1194,7 +1194,7 @@ int hci_setup_ext_adv_instance_sync(struct hci_dev *hdev, u8 instance) cp.own_addr_type = own_addr_type; cp.channel_map = hdev->le_adv_channel_map; - cp.handle = instance; + cp.handle = adv ? adv->handle : instance; if (flags & MGMT_ADV_FLAG_SEC_2M) { cp.primary_phy = HCI_ADV_PHY_1M; -- 2.45.0