{
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))
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))
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);