aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorAndre Guedes <aguedespe@gmail.com>2012-03-20 23:03:38 -0400
committerGustavo Padovan <gustavo@padovan.org>2012-05-08 23:41:34 -0400
commit1519cc177a05b96d8715c3cda244c46d6457efbb (patch)
tree4fbb6e504277618f3bb048e68ba4cbcc83ecd9ee /net
parent642be6c768bd686577ffe6ebcc5e6132a932537b (diff)
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')
-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 *
1722 if (!num_rsp) 1722 if (!num_rsp)
1723 return; 1723 return;
1724 1724
1725 if (test_bit(HCI_PERIODIC_INQ, &hdev->dev_flags))
1726 return;
1727
1725 hci_dev_lock(hdev); 1728 hci_dev_lock(hdev);
1726 1729
1727 for (; num_rsp; num_rsp--, info++) { 1730 for (; num_rsp; num_rsp--, info++) {
@@ -2826,6 +2829,9 @@ static inline void hci_inquiry_result_with_rssi_evt(struct hci_dev *hdev, struct
2826 if (!num_rsp) 2829 if (!num_rsp)
2827 return; 2830 return;
2828 2831
2832 if (test_bit(HCI_PERIODIC_INQ, &hdev->dev_flags))
2833 return;
2834
2829 hci_dev_lock(hdev); 2835 hci_dev_lock(hdev);
2830 2836
2831 if ((skb->len - 1) / num_rsp != sizeof(struct inquiry_info_with_rssi)) { 2837 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
2997 if (!num_rsp) 3003 if (!num_rsp)
2998 return; 3004 return;
2999 3005
3006 if (test_bit(HCI_PERIODIC_INQ, &hdev->dev_flags))
3007 return;
3008
3000 hci_dev_lock(hdev); 3009 hci_dev_lock(hdev);
3001 3010
3002 for (; num_rsp; num_rsp--, info++) { 3011 for (; num_rsp; num_rsp--, info++) {