]> git.karo-electronics.de Git - linux-beck.git/commitdiff
Bluetooth: Add Periodic Inquiry command complete handler
authorAndre Guedes <aguedespe@gmail.com>
Wed, 21 Mar 2012 03:03:35 +0000 (00:03 -0300)
committerGustavo Padovan <gustavo@padovan.org>
Wed, 9 May 2012 03:41:34 +0000 (00:41 -0300)
This patch adds a handler function to Periodic Inquiry command
complete event.

Signed-off-by: Andre Guedes <aguedespe@gmail.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo@padovan.org>
net/bluetooth/hci_event.c

index 0a936291f0e7879c2190e9108061421781a5c08d..a0fc1afb3ae45307509bcb7214b21278e1dc7e10 100644 (file)
@@ -69,6 +69,13 @@ static void hci_cc_inquiry_cancel(struct hci_dev *hdev, struct sk_buff *skb)
        hci_conn_check_pending(hdev);
 }
 
+static void hci_cc_periodic_inq(struct hci_dev *hdev, struct sk_buff *skb)
+{
+       __u8 status = *((__u8 *) skb->data);
+
+       BT_DBG("%s status 0x%x", hdev->name, status);
+}
+
 static void hci_cc_exit_periodic_inq(struct hci_dev *hdev, struct sk_buff *skb)
 {
        __u8 status = *((__u8 *) skb->data);
@@ -2155,6 +2162,10 @@ static inline void hci_cmd_complete_evt(struct hci_dev *hdev, struct sk_buff *sk
                hci_cc_inquiry_cancel(hdev, skb);
                break;
 
+       case HCI_OP_PERIODIC_INQ:
+               hci_cc_periodic_inq(hdev, skb);
+               break;
+
        case HCI_OP_EXIT_PERIODIC_INQ:
                hci_cc_exit_periodic_inq(hdev, skb);
                break;