summaryrefslogtreecommitdiff
path: root/net/bluetooth/hci_conn.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2014-03-24 20:21:50 +0200
committerMarcel Holtmann <marcel@holtmann.org>2014-03-26 09:31:35 -0700
commit9c84d1da974ee8b54fa49ae369648a0247b7cd6f (patch)
tree467b0eb8a32f9d6316d16ddb10c219c099fe1195 /net/bluetooth/hci_conn.c
parent4408dd15d9cfcf78b819d2d4a5b43dc36056cab8 (diff)
downloadlwn-9c84d1da974ee8b54fa49ae369648a0247b7cd6f.tar.gz
lwn-9c84d1da974ee8b54fa49ae369648a0247b7cd6f.zip
Bluetooth: Move local identity address setting to a central place
Any time hci_conn_add is used for an LE connection we need to ensure that the local identity address is correctly described in the src and src_type variables. This patch moves setting these values directly into hci_conn_add so that callers don't have to duplicate the effort themselves. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth/hci_conn.c')
-rw-r--r--net/bluetooth/hci_conn.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
index d958e2dca52f..129c22a85ccf 100644
--- a/net/bluetooth/hci_conn.c
+++ b/net/bluetooth/hci_conn.c
@@ -401,6 +401,10 @@ struct hci_conn *hci_conn_add(struct hci_dev *hdev, int type, bdaddr_t *dst)
case ACL_LINK:
conn->pkt_type = hdev->pkt_type & ACL_PTYPE_MASK;
break;
+ case LE_LINK:
+ /* conn->src should reflect the local identity address */
+ hci_copy_identity_address(hdev, &conn->src, &conn->src_type);
+ break;
case SCO_LINK:
if (lmp_esco_capable(hdev))
conn->pkt_type = (hdev->esco_type & SCO_ESCO_MASK) |