summaryrefslogtreecommitdiff
path: root/net/bluetooth/hci_event.c
diff options
context:
space:
mode:
authorAndre Guedes <aguedespe@gmail.com>2012-03-21 00:03:38 -0300
committerGustavo Padovan <gustavo@padovan.org>2012-05-09 00:41:34 -0300
commit1519cc177a05b96d8715c3cda244c46d6457efbb (patch)
tree4fbb6e504277618f3bb048e68ba4cbcc83ecd9ee /net/bluetooth/hci_event.c
parent642be6c768bd686577ffe6ebcc5e6132a932537b (diff)
downloadkernel-common-1519cc177a05b96d8715c3cda244c46d6457efbb.tar.gz
kernel-common-1519cc177a05b96d8715c3cda244c46d6457efbb.tar.bz2
kernel-common-1519cc177a05b96d8715c3cda244c46d6457efbb.zip
Bluetooth: Ignore inquiry results from periodic inquiry
This patch changes inquiry result function handlers so they ignore inquiry result events if periodic inquiry is enabled. Signed-off-by: Andre Guedes <aguedespe@gmail.com> Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Gustavo Padovan <gustavo@padovan.org>
Diffstat (limited to 'net/bluetooth/hci_event.c')
-rw-r--r--net/bluetooth/hci_event.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index a61838b74257..1778b18ffd97 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -1722,6 +1722,9 @@ static inline void hci_inquiry_result_evt(struct hci_dev *hdev, struct sk_buff *
if (!num_rsp)
return;
+ if (test_bit(HCI_PERIODIC_INQ, &hdev->dev_flags))
+ return;
+
hci_dev_lock(hdev);
for (; num_rsp; num_rsp--, info++) {
@@ -2826,6 +2829,9 @@ static inline void hci_inquiry_result_with_rssi_evt(struct hci_dev *hdev, struct
if (!num_rsp)
return;
+ if (test_bit(HCI_PERIODIC_INQ, &hdev->dev_flags))
+ return;
+
hci_dev_lock(hdev);
if ((skb->len - 1) / num_rsp != sizeof(struct inquiry_info_with_rssi)) {
@@ -2997,6 +3003,9 @@ static inline void hci_extended_inquiry_result_evt(struct hci_dev *hdev, struct
if (!num_rsp)
return;
+ if (test_bit(HCI_PERIODIC_INQ, &hdev->dev_flags))
+ return;
+
hci_dev_lock(hdev);
for (; num_rsp; num_rsp--, info++) {