diff options
author | Gustavo Padovan <gustavo.padovan@collabora.co.uk> | 2013-06-13 07:34:31 -0400 |
---|---|---|
committer | Gustavo Padovan <gustavo.padovan@collabora.co.uk> | 2013-06-22 22:05:47 -0400 |
commit | b8f4e068004859eefac7b1ced59ddb67ca6d2d80 (patch) | |
tree | 9d88a1aea22e6220011d6de72bee82885ae7697e | |
parent | 502f769662978a2fe99d0caed5e53e3006107381 (diff) |
Bluetooth: Improve comments on the HCI_Delete_Store_Link_Key issue
Some Bluetooth controllers doesn't support this command so we first
need to check for its support before sending it. This patch adds a
lengthful commentary about this.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
-rw-r--r-- | net/bluetooth/hci_core.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index e2e9d409d0f6..061523eb52a1 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c | |||
@@ -597,7 +597,15 @@ static void hci_init3_req(struct hci_request *req, unsigned long opt) | |||
597 | struct hci_dev *hdev = req->hdev; | 597 | struct hci_dev *hdev = req->hdev; |
598 | u8 p; | 598 | u8 p; |
599 | 599 | ||
600 | /* Only send HCI_Delete_Stored_Link_Key if it is supported */ | 600 | /* Some Broadcom based Bluetooth controllers do not support the |
601 | * Delete Stored Link Key command. They are clearly indicating its | ||
602 | * absence in the bit mask of supported commands. | ||
603 | * | ||
604 | * Check the supported commands and only if the the command is marked | ||
605 | * as supported send it. If not supported assume that the controller | ||
606 | * does not have actual support for stored link keys which makes this | ||
607 | * command redundant anyway. | ||
608 | */ | ||
601 | if (hdev->commands[6] & 0x80) { | 609 | if (hdev->commands[6] & 0x80) { |
602 | struct hci_cp_delete_stored_link_key cp; | 610 | struct hci_cp_delete_stored_link_key cp; |
603 | 611 | ||