[Bluetooth] Add hci_recv_fragment() helper function
[pandora-kernel.git] / include / net / bluetooth / hci_core.h
index df22efc..7c78744 100644 (file)
@@ -109,6 +109,7 @@ struct hci_dev {
        struct sk_buff_head     cmd_q;
 
        struct sk_buff          *sent_cmd;
+       struct sk_buff          *reassembly[3];
 
        struct semaphore        req_lock;
        wait_queue_head_t       req_wait_q;
@@ -153,6 +154,7 @@ struct hci_conn {
        __u8             mode;
        __u8             type;
        __u8             out;
+       __u8             attempt;
        __u8             dev_class[3];
        __u8             features[8];
        __u16            interval;
@@ -289,6 +291,22 @@ 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_state(struct hci_dev *hdev,
+                                       __u8 type, __u16 state)
+{
+       struct hci_conn_hash *h = &hdev->conn_hash;
+       struct list_head *p;
+       struct hci_conn  *c;
+
+       list_for_each(p, &h->list) {
+               c = list_entry(p, struct hci_conn, list);
+               if (c->type == type && c->state == state)
+                       return c;
+       }
+       return NULL;
+}
+
+void hci_acl_connect(struct hci_conn *conn);
 void hci_acl_disconn(struct hci_conn *conn, __u8 reason);
 void hci_add_sco(struct hci_conn *conn, __u16 handle);
 
@@ -420,6 +438,8 @@ static inline int hci_recv_frame(struct sk_buff *skb)
        return 0;
 }
 
+int hci_recv_fragment(struct hci_dev *hdev, int type, void *data, int count);
+
 int hci_register_sysfs(struct hci_dev *hdev);
 void hci_unregister_sysfs(struct hci_dev *hdev);
 void hci_conn_add_sysfs(struct hci_conn *conn);