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

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

Bluetooth: Check for flag instead of features in update_scan_rsp_data()



It's better to check for the device flag instead of device features so
that we avoid unnecessary HCI commands when the feature is supported but
disabled (i.e. the flag is unset).

Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent 2be48b65
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -568,7 +568,7 @@ static void update_scan_rsp_data(struct hci_request *req)
	struct hci_cp_le_set_scan_rsp_data cp;
	u8 len;

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

	memset(&cp, 0, sizeof(cp));