|
@@ -48,6 +48,8 @@ static void hci_cc_inquiry_cancel(struct hci_dev *hdev, struct sk_buff *skb)
|
|
|
}
|
|
|
|
|
|
clear_bit(HCI_INQUIRY, &hdev->flags);
|
|
|
+ smp_mb__after_clear_bit(); /* wake_up_bit advises about this barrier */
|
|
|
+ wake_up_bit(&hdev->flags, HCI_INQUIRY);
|
|
|
|
|
|
hci_dev_lock(hdev);
|
|
|
hci_discovery_set_state(hdev, DISCOVERY_STOPPED);
|
|
@@ -1603,6 +1605,9 @@ static void hci_inquiry_complete_evt(struct hci_dev *hdev, struct sk_buff *skb)
|
|
|
if (!test_and_clear_bit(HCI_INQUIRY, &hdev->flags))
|
|
|
return;
|
|
|
|
|
|
+ smp_mb__after_clear_bit(); /* wake_up_bit advises about this barrier */
|
|
|
+ wake_up_bit(&hdev->flags, HCI_INQUIRY);
|
|
|
+
|
|
|
if (!test_bit(HCI_MGMT, &hdev->dev_flags))
|
|
|
return;
|
|
|
|