]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/bluetooth/hci_event.c
[BLUETOOTH]: bnep endianness annotations
[linux-2.6-omap-h63xx.git] / net / bluetooth / hci_event.c
index 65f094845719126013cfb9f3c1c19e11f4b2b566..bb94e6da223cb6f3535f5fecd611e91d3c0c067f 100644 (file)
@@ -57,6 +57,7 @@
 static void hci_cc_link_ctl(struct hci_dev *hdev, __u16 ocf, struct sk_buff *skb)
 {
        __u8 status;
+       struct hci_conn *pend;
 
        BT_DBG("%s ocf 0x%x", hdev->name, ocf);
 
@@ -71,6 +72,15 @@ static void hci_cc_link_ctl(struct hci_dev *hdev, __u16 ocf, struct sk_buff *skb
                        clear_bit(HCI_INQUIRY, &hdev->flags);
                        hci_req_complete(hdev, status);
                }
+
+               hci_dev_lock(hdev);
+
+               pend = hci_conn_hash_lookup_state(hdev, ACL_LINK, BT_CONNECT2);
+               if (pend)
+                       hci_acl_connect(pend);
+
+               hci_dev_unlock(hdev);
+
                break;
 
        default:
@@ -565,11 +575,20 @@ static void hci_cs_info_param(struct hci_dev *hdev, __u16 ocf, __u8 status)
 static inline void hci_inquiry_complete_evt(struct hci_dev *hdev, struct sk_buff *skb)
 {
        __u8 status = *((__u8 *) skb->data);
+       struct hci_conn *pend;
 
        BT_DBG("%s status %d", hdev->name, status);
 
        clear_bit(HCI_INQUIRY, &hdev->flags);
        hci_req_complete(hdev, status);
+
+       hci_dev_lock(hdev);
+
+       pend = hci_conn_hash_lookup_state(hdev, ACL_LINK, BT_CONNECT2);
+       if (pend)
+               hci_acl_connect(pend);
+
+       hci_dev_unlock(hdev);
 }
 
 /* Inquiry Result */