summaryrefslogtreecommitdiff
path: root/include/net
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2014-02-23 21:42:20 +0400
committerMarcel Holtmann <marcel@holtmann.org>2014-02-24 00:24:25 +0400
commitd6bfd59caef7e543c7786af9664309dd1a7f6396 (patch)
tree1a0fc7016a85ed9b884cf8515c13a6b49e1d1f93 /include/net
parentb1e2b3ae97620752905e58a9682fad7222796566 (diff)
downloadlinux-d6bfd59caef7e543c7786af9664309dd1a7f6396.tar.xz
Bluetooth: Add timer for regenerating local RPA
This patch adds a timer for updating the local RPA periodically. The default timeout is set to 15 minutes. 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.h1
-rw-r--r--include/net/bluetooth/hci_core.h5
2 files changed, 6 insertions, 0 deletions
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
index 5ff885ff29df..1bb45a47a78a 100644
--- a/include/net/bluetooth/hci.h
+++ b/include/net/bluetooth/hci.h
@@ -127,6 +127,7 @@ enum {
HCI_SC_ENABLED,
HCI_SC_ONLY,
HCI_PRIVACY,
+ HCI_RPA_EXPIRED,
HCI_RPA_RESOLVING,
HCI_HS_ENABLED,
HCI_LE_ENABLED,
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index 68bbcabdd9fd..6415514e4f17 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -130,6 +130,9 @@ struct oob_data {
#define HCI_MAX_SHORT_NAME_LENGTH 10
+/* Default LE RPA expiry time, 15 minutes */
+#define HCI_DEFAULT_RPA_TIMEOUT (15 * 60)
+
struct amp_assoc {
__u16 len;
__u16 offset;
@@ -304,6 +307,8 @@ struct hci_dev {
__u8 scan_rsp_data_len;
__u8 irk[16];
+ __u32 rpa_timeout;
+ struct delayed_work rpa_expired;
int (*open)(struct hci_dev *hdev);
int (*close)(struct hci_dev *hdev);