Skip to content

Commit

Permalink
Bluetooth: Ignore inquiry results from periodic inquiry
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andre Guedes authored and Gustavo Padovan committed May 9, 2012
1 parent 642be6c commit 1519cc1
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions net/bluetooth/hci_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++) {
Expand Down Expand Up @@ -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)) {
Expand Down Expand Up @@ -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++) {
Expand Down

0 comments on commit 1519cc1

Please sign in to comment.