diff options
-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 | ||