OSDN Git Service

Bluetooth: Fix RSSI value in device found event from disabling scan
authorJohan Hedberg <johan.hedberg@intel.com>
Wed, 26 Mar 2014 12:17:12 +0000 (14:17 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 26 Mar 2014 16:31:41 +0000 (09:31 -0700)
When sending a pending device found event triggered by disabling LE
scanning we should use the stored RSSI instead of sending a zero value.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/hci_event.c

index 2ecb34f..ddb518c 100644 (file)
@@ -1091,8 +1091,9 @@ static void hci_cc_le_set_scan_enable(struct hci_dev *hdev,
                        struct discovery_state *d = &hdev->discovery;
 
                        mgmt_device_found(hdev, &d->last_adv_addr, LE_LINK,
-                                         d->last_adv_addr_type, NULL, 0, 0,
-                                         1, d->last_adv_data,
+                                         d->last_adv_addr_type, NULL,
+                                         d->last_adv_rssi, 0, 1,
+                                         d->last_adv_data,
                                          d->last_adv_data_len, NULL, 0);
                }