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

Commit af4168c5 authored by Michał Narajowski's avatar Michał Narajowski Committed by Johan Hedberg
Browse files

Bluetooth: Set appearance only for LE capable controllers



Setting appearance on controllers without LE support will result
in No Supported error.

Signed-off-by: default avatarMichał Narajowski <michal.narajowski@codecoup.pl>
Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
parent e74317f4
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -3178,6 +3178,10 @@ static int set_appearance(struct sock *sk, struct hci_dev *hdev, void *data,

	BT_DBG("");

	if (!lmp_le_capable(hdev))
		return mgmt_cmd_status(sk, hdev->id, MGMT_OP_SET_APPEARANCE,
				       MGMT_STATUS_NOT_SUPPORTED);

	apperance = le16_to_cpu(cp->appearance);

	hci_dev_lock(hdev);