summaryrefslogtreecommitdiff
path: root/net/bluetooth
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2014-03-29 08:39:53 +0200
committerMarcel Holtmann <marcel@holtmann.org>2014-03-29 00:50:24 -0700
commit5c5b93e4be2fb52dca055e32e235453aa172500b (patch)
tree5327a7acc8efa19d8351a07460e009591ed0df12 /net/bluetooth
parent0d3674084c89130bcaf15b1a69881b31f198ee72 (diff)
Bluetooth: Fix address in unmergeable device found events
When sending out a device found event caused by an advertising report in the situation where we couldn't store the report as a pending one, the code was incorrectly trying to use the address and address type from the pending data. Since the pending data is cleared in the previous line this causes a potentially incorrect address type and an address of BDADDR_ANY. This patch fixes the call to use the address information correctly from the received advertising report. 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_event.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index ddb518c62ed1..84acc4aabc5f 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -4081,9 +4081,8 @@ static void process_adv_report(struct hci_dev *hdev, u8 type, bdaddr_t *bdaddr,
* the pending report and send out a device found event.
*/
clear_pending_adv_report(hdev);
- mgmt_device_found(hdev, &d->last_adv_addr, LE_LINK,
- d->last_adv_addr_type, NULL, rssi, 0, 1,
- data, len, NULL, 0);
+ mgmt_device_found(hdev, bdaddr, LE_LINK, bdaddr_type, NULL,
+ rssi, 0, 1, data, len, NULL, 0);
return;
}