From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH BlueZ 1/2] core/device: Fix attempting to connect to random address over BR/EDR
Date: Fri, 2 Sep 2016 15:49:08 +0300 [thread overview]
Message-ID: <1472820549-1976-1-git-send-email-luiz.dentz@gmail.com> (raw)
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
BR/EDR don't have the concept of random addresses so the only option is
to over LE in that case.
---
src/device.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/device.c b/src/device.c
index fb766d1..b8556f1 100644
--- a/src/device.c
+++ b/src/device.c
@@ -1748,6 +1748,10 @@ static uint8_t select_conn_bearer(struct btd_device *dev)
else if (!dev->bredr_state.bonded && dev->le_state.bonded)
return dev->bdaddr_type;
+ /* If the address is private it can only be connected over LE */
+ if (device_address_is_private(dev))
+ return dev->bdaddr_type;
+
if (dev->bredr_seen) {
bredr_last = current - dev->bredr_seen;
if (bredr_last > SEEN_TRESHHOLD)
--
2.7.4
next reply other threads:[~2016-09-02 12:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-02 12:49 Luiz Augusto von Dentz [this message]
2016-09-02 12:49 ` [PATCH BlueZ 2/2] core/gatt-client: Fix not return empty array for ReadValue Luiz Augusto von Dentz
2016-09-05 9:46 ` [PATCH BlueZ 1/2] core/device: Fix attempting to connect to random address over BR/EDR Luiz Augusto von Dentz
2016-09-05 18:02 ` Johan Hedberg
2016-09-05 18:35 ` Luiz Augusto von Dentz
2016-09-06 4:57 ` Johan Hedberg
Reply instructions:
You may reply publicly 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=1472820549-1976-1-git-send-email-luiz.dentz@gmail.com \
--to=luiz.dentz@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).