aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorJakub Pawlowski <jpawlowski@google.com>2014-12-05 04:55:55 -0500
committerJohan Hedberg <johan.hedberg@intel.com>2014-12-05 05:37:33 -0500
commit37eab042be2196751ff108e6892951338b9a0969 (patch)
tree57ad7718aa5ed5bfb7cb0e39c5bc76291861fc56 /include/net
parent7e61df5423fe88a3e92bce59fb47686e52fb1d84 (diff)
Bluetooth: Add extra discovery fields for storing filter information
With the upcoming addition of support for Start Service Discovery, the discovery handling needs to filter on RSSI and UUID values. For that they need to be stored in the discovery handling. This patch adds the appropiate fields and also make sure they are reset when discovery has been stopped. Signed-off-by: Jakub Pawlowski <jpawlowski@google.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/bluetooth/hci_core.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index 1dae7001fc31..83ca58b9f4c1 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -75,6 +75,9 @@ struct discovery_state {
75 u32 last_adv_flags; 75 u32 last_adv_flags;
76 u8 last_adv_data[HCI_MAX_AD_LENGTH]; 76 u8 last_adv_data[HCI_MAX_AD_LENGTH];
77 u8 last_adv_data_len; 77 u8 last_adv_data_len;
78 s8 rssi;
79 u16 uuid_count;
80 u8 (*uuids)[16];
78}; 81};
79 82
80struct hci_conn_hash { 83struct hci_conn_hash {
@@ -503,6 +506,7 @@ static inline void discovery_init(struct hci_dev *hdev)
503 INIT_LIST_HEAD(&hdev->discovery.all); 506 INIT_LIST_HEAD(&hdev->discovery.all);
504 INIT_LIST_HEAD(&hdev->discovery.unknown); 507 INIT_LIST_HEAD(&hdev->discovery.unknown);
505 INIT_LIST_HEAD(&hdev->discovery.resolve); 508 INIT_LIST_HEAD(&hdev->discovery.resolve);
509 hdev->discovery.rssi = HCI_RSSI_INVALID;
506} 510}
507 511
508bool hci_discovery_active(struct hci_dev *hdev); 512bool hci_discovery_active(struct hci_dev *hdev);