From: johan.hedberg@gmail.com
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH v3 12/13] Bluetooth: Fix setting correct src_type when connecting LE
Date: Sun, 23 Feb 2014 19:42:28 +0200 [thread overview]
Message-ID: <1393177349-361-12-git-send-email-johan.hedberg@gmail.com> (raw)
In-Reply-To: <1393177349-361-1-git-send-email-johan.hedberg@gmail.com>
From: Johan Hedberg <johan.hedberg@intel.com>
This patch ensures that conn->src_type contains the same address type as
is used for initiating the connection while the connection attempt is in
progress. Once connected this value will be overwritten with the
identity address type.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
---
net/bluetooth/hci_conn.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
index 4cb337d6401f..a1efa1c62de8 100644
--- a/net/bluetooth/hci_conn.c
+++ b/net/bluetooth/hci_conn.c
@@ -567,6 +567,8 @@ static int hci_create_le_conn(struct hci_conn *conn)
if (err < 0)
return err;
+ conn->src_type = own_addr_type;
+
cp.scan_interval = cpu_to_le16(hdev->le_scan_interval);
cp.scan_window = cpu_to_le16(hdev->le_scan_window);
bacpy(&cp.peer_addr, &conn->dst);
@@ -653,7 +655,6 @@ static struct hci_conn *hci_connect_le(struct hci_dev *hdev, bdaddr_t *dst,
return ERR_PTR(-ENOMEM);
conn->dst_type = dst_type;
- conn->src_type = hdev->own_addr_type;
conn->state = BT_CONNECT;
conn->out = true;
--
1.8.5.3
next prev parent reply other threads:[~2014-02-23 17:42 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-23 17:42 [PATCH v3 01/13] Bluetooth: Ensure hci_conn always contains the local identity address johan.hedberg
2014-02-23 17:42 ` [PATCH v3 02/13] Bluetooth: Set the correct values for Identity Address Information johan.hedberg
2014-02-23 17:42 ` [PATCH v3 03/13] Bluetooth: Add SMP function for generating RPAs johan.hedberg
2014-02-23 17:42 ` [PATCH v3 04/13] Bluetooth: Add timer for regenerating local RPA johan.hedberg
2014-02-23 17:42 ` [PATCH v3 05/13] Bluetooth: Add hci_update_random_address() convenience function johan.hedberg
2014-02-23 17:42 ` [PATCH v3 06/13] Bluetooth: Use hci_update_random_address() when connecting LE johan.hedberg
2014-02-23 17:42 ` [PATCH v3 07/13] Bluetooth: Use hci_update_random_address() for enabling advertising johan.hedberg
2014-02-23 17:42 ` [PATCH v3 08/13] Bluetooth: Use hci_update_random_address() for initiating LE scan johan.hedberg
2014-02-23 17:42 ` [PATCH v3 09/13] Bluetooth: Don't write static address during power on johan.hedberg
2014-02-23 17:42 ` [PATCH v3 10/13] Bluetooth: Add debugfs entry for RPA regeneration timeout johan.hedberg
2014-02-23 17:42 ` [PATCH v3 11/13] Bluetooth: Add support for Set Privacy command johan.hedberg
2014-02-23 17:42 ` johan.hedberg [this message]
2014-02-23 17:42 ` [PATCH v3 13/13] Bluetooth: Remove unneeded hdev->own_addr_type johan.hedberg
2014-02-23 20:07 ` [PATCH v4] Bluetooth: Ensure hci_conn always contains the local identity address johan.hedberg
2014-02-23 20:44 ` Marcel Holtmann
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=1393177349-361-12-git-send-email-johan.hedberg@gmail.com \
--to=johan.hedberg@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