summaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2014-03-25 13:40:52 +0100
committerMarcel Holtmann <marcel@holtmann.org>2014-03-26 17:31:40 +0100
commitff5cd29f5cb8de0f0bc9016874ddde467d4b0c85 (patch)
tree0ee4de289e83c9296948c5c0d320793b2d5a38e9 /include/net
parentBluetooth: Don't send device found events for duplicate reports (diff)
downloadlinux-ff5cd29f5cb8de0f0bc9016874ddde467d4b0c85.tar.xz
linux-ff5cd29f5cb8de0f0bc9016874ddde467d4b0c85.zip
Bluetooth: Store also RSSI for pending advertising reports
Especially in crowded environments it can become frequent that we have to send out whatever pending event there is stored. Since user space has its own filtering of small RSSI changes sending a 0 value will essentially force user space to wake up the higher layers (e.g. over D-Bus) even though the RSSI didn't actually change more than the threshold value. This patch adds storing also of the RSSI for pending advertising reports so that we report an as accurate RSSI as possible when we have to send out the stored information to user space. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/bluetooth/hci_core.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index 0ba7617ceb27..c2a419c2c5c7 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -70,6 +70,7 @@ struct discovery_state {
__u32 timestamp;
bdaddr_t last_adv_addr;
u8 last_adv_addr_type;
+ s8 last_adv_rssi;
u8 last_adv_data[HCI_MAX_AD_LENGTH];
u8 last_adv_data_len;
};