From 6a577b9c7de8e449750cd20ada14680e1f4e69c7 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Wed, 22 Feb 2012 22:06:38 +0200 Subject: [PATCH] --- yaml --- r: 291043 b: refs/heads/master c: 7770c4aacaf34fb69cb2acfb7469e9b4e34f1674 h: refs/heads/master i: 291041: f8a8e4ec57f4850482e81752bad7c52c9585cf81 291039: 07968f4d685b29b0740687fed0644942aa0d5b84 v: v3 --- [refs] | 2 +- trunk/net/bluetooth/mgmt.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index ce13d261e5e1..57317ba5b0ac 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 8ec37034ef36b89cfb060bd9273db24e6acb1b3a +refs/heads/master: 7770c4aacaf34fb69cb2acfb7469e9b4e34f1674 diff --git a/trunk/net/bluetooth/mgmt.c b/trunk/net/bluetooth/mgmt.c index 23421f05abf2..3a2066504ffe 100644 --- a/trunk/net/bluetooth/mgmt.c +++ b/trunk/net/bluetooth/mgmt.c @@ -532,6 +532,9 @@ static int update_eir(struct hci_dev *hdev) { struct hci_cp_write_eir cp; + if (!test_bit(HCI_UP, &hdev->flags)) + return 0; + if (!(hdev->features[6] & LMP_EXT_INQ)) return 0; @@ -570,6 +573,9 @@ static int update_class(struct hci_dev *hdev) BT_DBG("%s", hdev->name); + if (!test_bit(HCI_UP, &hdev->flags)) + return 0; + if (test_bit(HCI_SERVICE_CACHE, &hdev->dev_flags)) return 0;