Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 291054
b: refs/heads/master
c: 504c8dc
h: refs/heads/master
v: v3
  • Loading branch information
Johan Hedberg committed Feb 23, 2012
1 parent a00b8f5 commit c2df828
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 69775ff6d101ccf435bd26ae822c24bbb20e11cf
refs/heads/master: 504c8dcd6b0ec3cd36ab221695c5516e88cf3d79
7 changes: 5 additions & 2 deletions trunk/net/bluetooth/mgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ static int update_eir(struct hci_dev *hdev)
{
struct hci_cp_write_eir cp;

if (!test_bit(HCI_UP, &hdev->flags))
if (!hdev_is_powered(hdev))
return 0;

if (!(hdev->features[6] & LMP_EXT_INQ))
Expand Down Expand Up @@ -573,7 +573,7 @@ static int update_class(struct hci_dev *hdev)

BT_DBG("%s", hdev->name);

if (!test_bit(HCI_UP, &hdev->flags))
if (!hdev_is_powered(hdev))
return 0;

if (test_bit(HCI_SERVICE_CACHE, &hdev->dev_flags))
Expand Down Expand Up @@ -3121,6 +3121,9 @@ int mgmt_powered(struct hci_dev *hdev, u8 powered)

if (scan)
hci_send_cmd(hdev, HCI_OP_WRITE_SCAN_ENABLE, 1, &scan);

update_class(hdev);
update_eir(hdev);
} else {
u8 status = ENETDOWN;
mgmt_pending_foreach(0, hdev, cmd_status_rsp, &status);
Expand Down

0 comments on commit c2df828

Please sign in to comment.