From: Andrei Emeltchenko <Andrei.Emeltchenko.news@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH 2/2] Bluetooth: Use HCI_MGMT instead of HCI_LINK_KEYS flag
Date: Tue, 7 May 2013 14:35:47 +0300 [thread overview]
Message-ID: <1367926547-8279-2-git-send-email-Andrei.Emeltchenko.news@gmail.com> (raw)
In-Reply-To: <1367926547-8279-1-git-send-email-Andrei.Emeltchenko.news@gmail.com>
From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Remove HCI_LINK_KEYS flag since standard HCI_MGMT can be used instead.
There is also problem with HCI_LINK_KEYS flag since it is set only
when link keys are loaded. Otherwise kernel assumes that old
interface is used.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
---
include/net/bluetooth/hci.h | 1 -
net/bluetooth/hci_event.c | 2 +-
net/bluetooth/mgmt.c | 2 --
3 files changed, 1 insertion(+), 4 deletions(-)
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
index e0512aa..3c592cf 100644
--- a/include/net/bluetooth/hci.h
+++ b/include/net/bluetooth/hci.h
@@ -107,7 +107,6 @@ enum {
HCI_MGMT,
HCI_PAIRABLE,
HCI_SERVICE_CACHE,
- HCI_LINK_KEYS,
HCI_DEBUG_KEYS,
HCI_UNREGISTER,
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index e547cfd..0437200 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -2687,7 +2687,7 @@ static void hci_link_key_notify_evt(struct hci_dev *hdev, struct sk_buff *skb)
hci_conn_drop(conn);
}
- if (test_bit(HCI_LINK_KEYS, &hdev->dev_flags))
+ if (test_bit(HCI_MGMT, &hdev->dev_flags))
hci_add_link_key(hdev, conn, 1, &ev->bdaddr, ev->link_key,
ev->key_type, pin_len);
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 8567764..5cd3aee 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -1736,8 +1736,6 @@ static int load_link_keys(struct sock *sk, struct hci_dev *hdev, void *data,
hci_link_keys_clear(hdev);
- set_bit(HCI_LINK_KEYS, &hdev->dev_flags);
-
if (cp->debug_keys)
set_bit(HCI_DEBUG_KEYS, &hdev->dev_flags);
else
--
1.8.1.2
next prev parent reply other threads:[~2013-05-07 11:35 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-06 13:50 [RFC] Bluetooth: Fix not sending link key negative reply Andrei Emeltchenko
2013-05-07 6:06 ` Johan Hedberg
2013-05-07 10:51 ` [PATCHv2] " Andrei Emeltchenko
2013-05-07 11:14 ` Johan Hedberg
2013-05-07 11:35 ` [PATCH 1/2] Bluetooth: Use HCI_MGMT flag for link keys management Andrei Emeltchenko
2013-05-07 11:35 ` Andrei Emeltchenko [this message]
2013-05-07 11:41 ` [PATCH 2/2] Bluetooth: Use HCI_MGMT instead of HCI_LINK_KEYS flag Johan Hedberg
2013-05-07 11:57 ` [PATCH] " Andrei Emeltchenko
2013-05-14 8:44 ` [PATCHv2 1/2] " Andrei Emeltchenko
2013-05-14 8:44 ` [PATCHv2 2/2] Bluetooth: Remove unneeded flag Andrei Emeltchenko
2013-05-14 9:03 ` Johan Hedberg
2013-05-20 20:59 ` Gustavo Padovan
2013-05-20 21:44 ` Gustavo Padovan
2013-05-14 9:02 ` [PATCHv2 1/2] Bluetooth: Use HCI_MGMT instead of HCI_LINK_KEYS flag Johan Hedberg
2013-05-20 20:58 ` Gustavo Padovan
2013-05-07 12:51 ` [PATCHv2] Bluetooth: Fix not sending link key negative reply Andrei Emeltchenko
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=1367926547-8279-2-git-send-email-Andrei.Emeltchenko.news@gmail.com \
--to=andrei.emeltchenko.news@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).