Linux bluetooth development
 help / color / mirror / Atom feed
From: johan.hedberg@gmail.com
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH 3/9] Bluetooth: Add missing check for BREDR_ENABLED flag in update_class()
Date: Sat, 19 Oct 2013 23:38:17 +0300	[thread overview]
Message-ID: <1382215103-6968-4-git-send-email-johan.hedberg@gmail.com> (raw)
In-Reply-To: <1382215103-6968-1-git-send-email-johan.hedberg@gmail.com>

From: Johan Hedberg <johan.hedberg@intel.com>

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>
---
 net/bluetooth/mgmt.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index dd0bd4a..c363285 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;
 
-- 
1.8.3.1


  parent reply	other threads:[~2013-10-19 20:38 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-19 20:38 [PATCH 0/9] Bluetooth: Add LE support for mgmt_set_discoverable johan.hedberg
2013-10-19 20:38 ` [PATCH 1/9] Bluetooth: Check for flag instead of features in update_scan_rsp_data() johan.hedberg
2013-10-19 20:38 ` [PATCH 2/9] Bluetooth: Check for flag instead of features in update_adv_data() johan.hedberg
2013-10-19 20:38 ` johan.hedberg [this message]
2013-10-19 20:38 ` [PATCH 4/9] Bluetooth: Refactor set_connectable settings update to separate function johan.hedberg
2013-10-19 20:38 ` [PATCH 5/9] Bluetooth: Fix updating settings when there are no HCI commands to send johan.hedberg
2013-10-19 20:38 ` [PATCH 6/9] Bluetooth: Move mgmt_pending_find to avoid forward declarations johan.hedberg
2013-10-19 20:38 ` [PATCH 7/9] Bluetooth: Fix sending write_scan_enable when BR/EDR is disabled johan.hedberg
2013-10-19 20:38 ` [PATCH 8/9] Bluetooth: Move HCI_LIMITED_DISCOVERABLE changes to a general place johan.hedberg
2013-10-19 20:38 ` [PATCH 9/9] Bluetooth: Update Set Discoverable to support LE johan.hedberg
2013-10-19 22:11   ` Marcel Holtmann
2013-10-20  8:55   ` [PATCH v2] " johan.hedberg
2013-10-20 16:00     ` [PATCH v3] " johan.hedberg
2013-10-20 16:07       ` Marcel Holtmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1382215103-6968-4-git-send-email-johan.hedberg@gmail.com \
    --to=johan.hedberg@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox