Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f87ea1da authored by Johan Hedberg's avatar Johan Hedberg Committed by Marcel Holtmann
Browse files

Bluetooth: Add missing check for BREDR_ENABLED flag in update_class()



We shouldn't be sending the HCI_Write_Class_Of_Device command when
BR/EDR is disabled since this is a BR/EDR-only command.

Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent 10994ce6
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -749,6 +749,9 @@ static void update_class(struct hci_request *req)
	if (!hdev_is_powered(hdev))
		return;

	if (!test_bit(HCI_BREDR_ENABLED, &hdev->dev_flags))
		return;

	if (test_bit(HCI_SERVICE_CACHE, &hdev->dev_flags))
		return;