From: Andre Guedes <andre.guedes@openbossa.org>
To: linux-bluetooth@vger.kernel.org
Subject: [RFC 0/3] LE Connection
Date: Tue, 27 Mar 2012 20:59:33 -0300 [thread overview]
Message-ID: <1332892776-12060-1-git-send-email-andre.guedes@openbossa.org> (raw)
Hi all,
In order to establish a LE connection, we need to know the address type
(public or random) from the remote device. Since this information was not
exposed to user-space and we were not sure about changing the Bluetooth ABI
at that time, we came up with a in-kernel solution to enable LE connections.
We store sensitive information (bdaddr and bdaddr_type) gathered from LE
advertising report events. Once we get a connection request from user-space,
we search the destination address in the advertising cache to get its type
and then start the connection establishment.
Nevertheless, today, the remote device address type is exposed to user-space
through management interface events. We can use this information to establish
LE connection and drop the advertising cache in kernel.
To achieve that, we may add the address type field to struct sockaddr_l2.
This new field would be used for LE connection only. BR/EDR sockets would just
ignore it. We wouldn't even need to set this field for BR/EDR sockets.
These changes would be taken in four steps:
1. Kernel: add address type info to struct sockaddr_l2
2. User-space: set the address type field for LE connections
3. Kernel: use address type info from user-space instead of checking
advertising cache
4. Kernel: remove advertising cache code
This RFC series implements steps 1 and 3. User-space work is still under
development and we'll send a RFC soon. Step 4 would be started as soon as
we have steps 1, 2 and 3 done.
These RFC patches are just to you guys take a look how the code looks like
and provide some comments. They are still under testing.
Feedback are very welcome.
Regards,
Andre Guedes
Andre Guedes (3):
Bluetooth: Add address type to struct sockaddr_l2
Bluetooth: Add dst_type parameter to hci_connect
Bluetooth: Use address type info from User-space
include/net/bluetooth/hci_core.h | 2 +-
include/net/bluetooth/l2cap.h | 3 ++-
net/bluetooth/hci_conn.c | 12 ++++--------
net/bluetooth/l2cap_core.c | 11 ++++++-----
net/bluetooth/l2cap_sock.c | 2 +-
net/bluetooth/mgmt.c | 8 ++++----
net/bluetooth/sco.c | 3 ++-
7 files changed, 20 insertions(+), 21 deletions(-)
--
1.7.9.4
next reply other threads:[~2012-03-27 23:59 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-27 23:59 Andre Guedes [this message]
2012-03-27 23:59 ` [RFC 1/3] Bluetooth: Add address type to struct sockaddr_l2 Andre Guedes
2012-03-27 23:59 ` [RFC 2/3] Bluetooth: Add dst_type parameter to hci_connect Andre Guedes
2012-03-28 8:48 ` Andrei Emeltchenko
2012-03-28 14:05 ` Andre Guedes
2012-03-29 9:12 ` Johan Hedberg
2012-03-29 17:13 ` Andre Guedes
2012-03-29 17:31 ` Marcel Holtmann
2012-03-29 17:56 ` Andre Guedes
2012-03-27 23:59 ` [RFC 3/3] Bluetooth: Use address type info from User-space Andre Guedes
2012-03-28 8:56 ` Andrei Emeltchenko
2012-03-28 14:05 ` Andre Guedes
2012-03-28 14:26 ` Andrei Emeltchenko
2012-03-28 17:15 ` Andre Guedes
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=1332892776-12060-1-git-send-email-andre.guedes@openbossa.org \
--to=andre.guedes@openbossa.org \
--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