From: johan.hedberg@gmail.com
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH 3/4] Bluetooth: Fix resetting HCI_MGMT flag
Date: Mon, 9 Jan 2012 13:46:04 +0200 [thread overview]
Message-ID: <1326109565-32631-3-git-send-email-johan.hedberg@gmail.com> (raw)
In-Reply-To: <1326109565-32631-1-git-send-email-johan.hedberg@gmail.com>
From: Johan Hedberg <johan.hedberg@intel.com>
The HCI_MGMT flag should not be cleared when resetting a HCI device.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
---
net/bluetooth/hci_event.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index 4693bbc..94a9ca2 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -195,7 +195,8 @@ static void hci_cc_reset(struct hci_dev *hdev, struct sk_buff *skb)
hci_req_complete(hdev, HCI_OP_RESET, status);
- hdev->dev_flags = 0;
+ /* Reset all flags, except persistent ones like HCI_MGMT */
+ hdev->dev_flags &= BIT(HCI_MGMT);
}
static void hci_cc_write_local_name(struct hci_dev *hdev, struct sk_buff *skb)
--
1.7.8.2
next prev parent reply other threads:[~2012-01-09 11:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-09 11:46 [PATCH 1/4] Bluetooth: Remove bogus inline declaration from l2cap_chan_connect johan.hedberg
2012-01-09 11:46 ` [PATCH 2/4] Bluetooth: Move mgmt related flags from hdev->flags to hdev->dev_flags johan.hedberg
2012-01-09 19:41 ` Marcel Holtmann
2012-01-09 11:46 ` johan.hedberg [this message]
2012-01-09 19:43 ` [PATCH 3/4] Bluetooth: Fix resetting HCI_MGMT flag Marcel Holtmann
2012-01-09 11:46 ` [PATCH 4/4] Bluetooth: Sort to-be-resolved devices by RSSI during discovery johan.hedberg
2012-01-09 19:44 ` Marcel Holtmann
2012-01-09 19:40 ` [PATCH 1/4] Bluetooth: Remove bogus inline declaration from l2cap_chan_connect 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=1326109565-32631-3-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;
as well as URLs for NNTP newsgroup(s).