summaryrefslogtreecommitdiffstats
path: root/net/bluetooth/mgmt.c
diff options
context:
space:
mode:
authorJohan Hedberg2013-10-19 22:38:17 +0200
committerMarcel Holtmann2013-10-20 18:05:40 +0200
commitf87ea1dabb4b0e50f0c3d7140d89f1bb697a1676 (patch)
tree2960c625fbe1c232b02796d947085e3b86678832 /net/bluetooth/mgmt.c
parentBluetooth: Check for flag instead of features in update_adv_data() (diff)
downloadkernel-qcow2-linux-f87ea1dabb4b0e50f0c3d7140d89f1bb697a1676.tar.gz
kernel-qcow2-linux-f87ea1dabb4b0e50f0c3d7140d89f1bb697a1676.tar.xz
kernel-qcow2-linux-f87ea1dabb4b0e50f0c3d7140d89f1bb697a1676.zip
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: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth/mgmt.c')
-rw-r--r--net/bluetooth/mgmt.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index dd0bd4a55c8a..c363285c64a8 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -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;