diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2014-02-23 19:42:28 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2014-02-23 12:24:26 -0800 |
commit | e26b1ffa11bb1e0afa194823623ee64b7e143993 (patch) | |
tree | 7d5dee68b9ee71065926d86d6ab43093ac40f375 /net/bluetooth | |
parent | 62b04cd124cb76ce0b9a6391c6c046c08c1ac8b7 (diff) | |
download | talos-obmc-linux-e26b1ffa11bb1e0afa194823623ee64b7e143993.tar.gz talos-obmc-linux-e26b1ffa11bb1e0afa194823623ee64b7e143993.zip |
Bluetooth: Fix setting correct src_type when connecting LE
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>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth')
-rw-r--r-- | net/bluetooth/hci_conn.c | 3 |
1 files changed, 2 insertions, 1 deletions
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; |