All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC] Bluetooth: Fix not sending link key negative reply
@ 2013-05-06 13:50 Andrei Emeltchenko
  2013-05-07  6:06 ` Johan Hedberg
  0 siblings, 1 reply; 16+ messages in thread
From: Andrei Emeltchenko @ 2013-05-06 13:50 UTC (permalink / raw)
  To: linux-bluetooth

From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>

If Link Keys are not loaded then HCI_LINK_KEYS is not set
and for HCI Event "Link Key Request" reply is not sent.
--
send as RFC since I did not get why we need this flag really.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
---
 net/bluetooth/hci_event.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index db58e72..e7de1df 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -2611,11 +2611,11 @@ static void hci_link_key_request_evt(struct hci_dev *hdev, struct sk_buff *skb)
 
 	BT_DBG("%s", hdev->name);
 
-	if (!test_bit(HCI_LINK_KEYS, &hdev->dev_flags))
-		return;
-
 	hci_dev_lock(hdev);
 
+	if (!test_bit(HCI_LINK_KEYS, &hdev->dev_flags))
+		goto not_found;
+
 	key = hci_find_link_key(hdev, &ev->bdaddr);
 	if (!key) {
 		BT_DBG("%s link key not found for %pMR", hdev->name,
-- 
1.8.1.2


^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2013-05-20 21:44 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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         ` [PATCH 2/2] Bluetooth: Use HCI_MGMT instead of HCI_LINK_KEYS flag Andrei Emeltchenko
2013-05-07 11:41           ` 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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.