OSDN Git Service
(root)
/
tomoyo
/
tomoyo-test1.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e74317f
)
Bluetooth: Set appearance only for LE capable controllers
author
Michał Narajowski
<michal.narajowski@codecoup.pl>
Mon, 19 Sep 2016 12:33:33 +0000
(14:33 +0200)
committer
Johan Hedberg
<johan.hedberg@intel.com>
Mon, 19 Sep 2016 18:48:22 +0000
(21:48 +0300)
Setting appearance on controllers without LE support will result
in No Supported error.
Signed-off-by: Michał Narajowski <michal.narajowski@codecoup.pl>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
net/bluetooth/mgmt.c
patch
|
blob
|
history
diff --git
a/net/bluetooth/mgmt.c
b/net/bluetooth/mgmt.c
index
cd9f345
..
7b2bac4
100644
(file)
--- a/
net/bluetooth/mgmt.c
+++ b/
net/bluetooth/mgmt.c
@@
-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);