]> git.karo-electronics.de Git - karo-tx-linux.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, 28 Mar 2012 15:28:51 +0000 (12:28 -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>
include/net/bluetooth/hci.h
net/bluetooth/hci_event.c

index dbbb593f134f80db07137ddab150ab63b3c6b08d..d74645edbcd6a45525eb5872132a1e6bb1cd31e4 100644 (file)
@@ -324,6 +324,8 @@ struct hci_cp_inquiry {
 
 #define HCI_OP_INQUIRY_CANCEL          0x0402
 
+#define HCI_OP_PERIODIC_INQ            0x0403
+
 #define HCI_OP_EXIT_PERIODIC_INQ       0x0404
 
 #define HCI_OP_CREATE_CONN             0x0405
index 04d39f410485a881f7afed3371a071aa2e89f838..af0c5a29e995e99ff402d55a6fab6b901ded7114 100644 (file)
@@ -70,6 +70,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);
@@ -2154,6 +2161,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;