aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2013-10-13 05:23:59 -0700
committerMister Oyster <oysterized@gmail.com>2017-04-11 10:59:08 +0200
commit465bede53aa29c9a0eb474ff39ad7a774da95002 (patch)
tree1658c4f70ecd47c02a60a8b1a06883cf420564e8 /net
parenta6ba44cbb1c0f2612363f361f192220d5e582936 (diff)
Bluetooth: Store source address of HCI connections
The source addressed was based on the public address of the HCI device, but with LE connections this not always the case. For example single mode LE-only controllers would use a static random address. And this address is configured by userspace. To not complicate the lookup of what kind of address is in use, store the correct source address for each HCI connection. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Kamal Negi <kamaln@codeaurora.org>
Diffstat (limited to 'net')
-rw-r--r--net/bluetooth/hci_conn.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
index 4b4c160a4..650fc55c5 100644
--- a/net/bluetooth/hci_conn.c
+++ b/net/bluetooth/hci_conn.c
@@ -366,6 +366,7 @@ struct hci_conn *hci_conn_add(struct hci_dev *hdev, int type,
return NULL;
bacpy(&conn->dst, dst);
+ bacpy(&conn->src, &hdev->bdaddr);
conn->hdev = hdev;
conn->type = type;
conn->mode = HCI_CM_ACTIVE;