From: Marcel Holtmann Date: Tue, 18 Feb 2014 22:22:19 +0000 (-0800) Subject: Bluetooth: Report identity address when remote device connects X-Git-Tag: v5.15~17544^2~11^2~7^2~45^2~180 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=01fdb0fc6e937eeff7b20d0e217408cee9ec05af;p=platform%2Fkernel%2Flinux-starfive.git Bluetooth: Report identity address when remote device connects When the remote device has been successfully connected, report the identity address (public address or static random address). Currently the address from the HCI_LE_Connection_Complete event is used. This was no problem so far, but since now known resolvable random addresses are converted into identities, it is important to use the identity of the connection and not the address report by HCI event. Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg --- diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index 49a2d4d..d7c7095 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c @@ -3618,7 +3618,7 @@ static void hci_le_conn_complete_evt(struct hci_dev *hdev, struct sk_buff *skb) } if (!test_and_set_bit(HCI_CONN_MGMT_CONNECTED, &conn->flags)) - mgmt_device_connected(hdev, &ev->bdaddr, conn->type, + mgmt_device_connected(hdev, &conn->dst, conn->type, conn->dst_type, 0, NULL, 0, NULL); conn->sec_level = BT_SECURITY_LOW;