diff options
Diffstat (limited to 'net/bluetooth/hci_event.c')
-rw-r--r-- | net/bluetooth/hci_event.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index a0fc1afb3ae4..a61838b74257 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c | |||
@@ -74,6 +74,11 @@ static void hci_cc_periodic_inq(struct hci_dev *hdev, struct sk_buff *skb) | |||
74 | __u8 status = *((__u8 *) skb->data); | 74 | __u8 status = *((__u8 *) skb->data); |
75 | 75 | ||
76 | BT_DBG("%s status 0x%x", hdev->name, status); | 76 | BT_DBG("%s status 0x%x", hdev->name, status); |
77 | |||
78 | if (status) | ||
79 | return; | ||
80 | |||
81 | set_bit(HCI_PERIODIC_INQ, &hdev->dev_flags); | ||
77 | } | 82 | } |
78 | 83 | ||
79 | static void hci_cc_exit_periodic_inq(struct hci_dev *hdev, struct sk_buff *skb) | 84 | static void hci_cc_exit_periodic_inq(struct hci_dev *hdev, struct sk_buff *skb) |
@@ -85,6 +90,8 @@ static void hci_cc_exit_periodic_inq(struct hci_dev *hdev, struct sk_buff *skb) | |||
85 | if (status) | 90 | if (status) |
86 | return; | 91 | return; |
87 | 92 | ||
93 | clear_bit(HCI_PERIODIC_INQ, &hdev->dev_flags); | ||
94 | |||
88 | hci_conn_check_pending(hdev); | 95 | hci_conn_check_pending(hdev); |
89 | } | 96 | } |
90 | 97 | ||
@@ -199,7 +206,8 @@ static void hci_cc_reset(struct hci_dev *hdev, struct sk_buff *skb) | |||
199 | hci_req_complete(hdev, HCI_OP_RESET, status); | 206 | hci_req_complete(hdev, HCI_OP_RESET, status); |
200 | 207 | ||
201 | /* Reset all non-persistent flags */ | 208 | /* Reset all non-persistent flags */ |
202 | hdev->dev_flags &= ~(BIT(HCI_LE_SCAN) | BIT(HCI_PENDING_CLASS)); | 209 | hdev->dev_flags &= ~(BIT(HCI_LE_SCAN) | BIT(HCI_PENDING_CLASS) | |
210 | BIT(HCI_PERIODIC_INQ)); | ||
203 | 211 | ||
204 | hdev->discovery.state = DISCOVERY_STOPPED; | 212 | hdev->discovery.state = DISCOVERY_STOPPED; |
205 | } | 213 | } |