aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAndre Guedes <andre.guedes@openbossa.org>2011-05-26 15:23:53 -0400
committerGustavo F. Padovan <padovan@profusion.mobi>2011-06-08 15:58:17 -0400
commit3581508571b513ed2e66d71f9708d6be907460fd (patch)
tree070c5b393058deba57d775a143fc91cb5d010bb3 /include
parenteb9d91f5ae9c14583c49223e49f7e88f77b84749 (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')
-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 10dfb85ad6a1..af4b0ed173a8 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -188,6 +188,7 @@ struct hci_dev {
188 struct list_head remote_oob_data; 188 struct list_head remote_oob_data;
189 189
190 struct list_head adv_entries; 190 struct list_head adv_entries;
191 struct timer_list adv_timer;
191 192
192 struct hci_dev_stats stat; 193 struct hci_dev_stats stat;
193 194
@@ -535,6 +536,7 @@ int hci_add_remote_oob_data(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 *hash,
535 u8 *randomizer); 536 u8 *randomizer);
536int hci_remove_remote_oob_data(struct hci_dev *hdev, bdaddr_t *bdaddr); 537int hci_remove_remote_oob_data(struct hci_dev *hdev, bdaddr_t *bdaddr);
537 538
539#define ADV_CLEAR_TIMEOUT (3*60*HZ) /* Three minutes */
538int hci_adv_entries_clear(struct hci_dev *hdev); 540int hci_adv_entries_clear(struct hci_dev *hdev);
539struct adv_entry *hci_find_adv_entry(struct hci_dev *hdev, bdaddr_t *bdaddr); 541struct adv_entry *hci_find_adv_entry(struct hci_dev *hdev, bdaddr_t *bdaddr);
540int hci_add_adv_entry(struct hci_dev *hdev, 542int hci_add_adv_entry(struct hci_dev *hdev,