Linux-Bluetooth Archive on lore.kernel.org
 help / color / Atom feed
From: Johan Hedberg <johan.hedberg@gmail.com>
To: Howard Chung <howardchung@google.com>
Cc: Bluez mailing list <linux-bluetooth@vger.kernel.org>,
	Luiz Von Dentz <luiz.von.dentz@intel.com>,
	ChromeOS Bluetooth Upstreaming 
	<chromeos-bluetooth-upstreaming@chromium.org>
Subject: Re: [Bluez PATCH v3] core: Add new policy for Just-Works repairing
Date: Fri, 14 Feb 2020 09:33:07 +0200
Message-ID: <1BEAEE28-6159-491D-BCCC-4C5298891987@gmail.com> (raw)
In-Reply-To: <20200214114350.Bluez.v3.1.I333a90ad3c75882c6f008c94a28ca7d3e8f6c76e@changeid>

Hi Howard,

On 14. Feb 2020, at 5.45, Howard Chung <howardchung@google.com> wrote:
> @@ -6141,6 +6141,22 @@ int device_confirm_passkey(struct btd_device *device, uint8_t type,
> 	struct authentication_req *auth;
> 	int err;
> 
> +	/* Just-Works repairing policy */
> +	if (confirm_hint && (device_is_paired(device, BDADDR_BREDR) ||
> +				device_is_paired(device, BDADDR_LE_PUBLIC))) {

Wouldn’t a single call to device_is_paired() using “type” (the address type that’s part of the mgmt event) be the right thing to do here?

Johan

  reply index

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-14  3:45 Howard Chung
2020-02-14  7:33 ` Johan Hedberg [this message]
2020-02-14 18:26   ` Luiz Augusto von Dentz

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1BEAEE28-6159-491D-BCCC-4C5298891987@gmail.com \
    --to=johan.hedberg@gmail.com \
    --cc=chromeos-bluetooth-upstreaming@chromium.org \
    --cc=howardchung@google.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=luiz.von.dentz@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-Bluetooth Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-bluetooth/0 linux-bluetooth/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-bluetooth linux-bluetooth/ https://lore.kernel.org/linux-bluetooth \
		linux-bluetooth@vger.kernel.org
	public-inbox-index linux-bluetooth

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-bluetooth


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git