|
@@ -794,6 +794,30 @@ static inline struct hci_conn *hci_conn_hash_lookup_ba(struct hci_dev *hdev,
|
|
|
return NULL;
|
|
|
}
|
|
|
|
|
|
+static inline struct hci_conn *hci_conn_hash_lookup_le(struct hci_dev *hdev,
|
|
|
+ bdaddr_t *ba,
|
|
|
+ __u8 ba_type)
|
|
|
+{
|
|
|
+ struct hci_conn_hash *h = &hdev->conn_hash;
|
|
|
+ struct hci_conn *c;
|
|
|
+
|
|
|
+ rcu_read_lock();
|
|
|
+
|
|
|
+ list_for_each_entry_rcu(c, &h->list, list) {
|
|
|
+ if (c->type != LE_LINK)
|
|
|
+ continue;
|
|
|
+
|
|
|
+ if (ba_type == c->dst_type && !bacmp(&c->dst, ba)) {
|
|
|
+ rcu_read_unlock();
|
|
|
+ return c;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ rcu_read_unlock();
|
|
|
+
|
|
|
+ return NULL;
|
|
|
+}
|
|
|
+
|
|
|
static inline struct hci_conn *hci_conn_hash_lookup_state(struct hci_dev *hdev,
|
|
|
__u8 type, __u16 state)
|
|
|
{
|