summaryrefslogtreecommitdiff
path: root/include/net
diff options
context:
space:
mode:
authorAndre Guedes <andre.guedes@openbossa.org>2011-05-26 16:23:53 -0300
committerJaikumar Ganesh <jaikumar@google.com>2011-07-11 11:59:14 -0700
commit45e600fedef0ca2d9b5b5a09772f9e7a9d74d3b6 (patch)
treed4572fbd21762483400af4f7326c15a62a44c330 /include/net
parent726e1334c7e975a0be3e675f9a67633ddd8afae3 (diff)
Bluetooth: Advertising entries lifetime
This patch adds a timer to clear 'adv_entries' after three minutes. After some amount of time, the advertising entries cached during the last LE scan should be considered expired and they should be removed from the advertising cache. It was chosen a three minutes timeout as an initial attempt. This value might change in future. Signed-off-by: Andre Guedes <andre.guedes@openbossa.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/bluetooth/hci_core.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index 673cd23bdf3..01459ecc16e 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -188,6 +188,7 @@ struct hci_dev {
struct list_head remote_oob_data;
struct list_head adv_entries;
+ struct timer_list adv_timer;
struct hci_dev_stats stat;
@@ -538,6 +539,7 @@ int hci_add_remote_oob_data(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 *hash,
u8 *randomizer);
int hci_remove_remote_oob_data(struct hci_dev *hdev, bdaddr_t *bdaddr);
+#define ADV_CLEAR_TIMEOUT (3*60*HZ) /* Three minutes */
int hci_adv_entries_clear(struct hci_dev *hdev);
struct adv_entry *hci_find_adv_entry(struct hci_dev *hdev, bdaddr_t *bdaddr);
int hci_add_adv_entry(struct hci_dev *hdev,