These functions should just silently fail when we're not powered on
instead of trying to send HCI commands.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
{
struct hci_cp_write_eir cp;
+ if (!test_bit(HCI_UP, &hdev->flags))
+ return 0;
+
if (!(hdev->features[6] & LMP_EXT_INQ))
return 0;
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;