diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2014-01-03 06:02:35 -0500 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2014-01-04 13:10:40 -0500 |
commit | f9f462faa02777f497eb25255683a94e0c054de6 (patch) | |
tree | 72ef22cb0c6c553537ba3018e223404ae084423e /net/bluetooth/hci_core.c | |
parent | bc7219709978b963bc6820717e140c15547a6dd9 (diff) |
Bluetooth: Add quirk for disabling Delete Stored Link Key command
Some controller pretend they support the Delete Stored Link Key command,
but in reality they really don't support it.
< HCI Command: Delete Stored Link Key (0x03|0x0012) plen 7
bdaddr 00:00:00:00:00:00 all 1
> HCI Event: Command Complete (0x0e) plen 4
Delete Stored Link Key (0x03|0x0012) ncmd 1
status 0x11 deleted 0
Error: Unsupported Feature or Parameter Value
Not correctly supporting this command causes the controller setup to
fail and will make a device not work. However sending the command for
controller that handle stored link keys is important. This quirk
allows a driver to disable the command if it knows that this command
handling is broken.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'net/bluetooth/hci_core.c')
-rw-r--r-- | net/bluetooth/hci_core.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index b23d40385f18..5e8663c194c1 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c | |||
@@ -1304,8 +1304,13 @@ static void hci_init3_req(struct hci_request *req, unsigned long opt) | |||
1304 | * as supported send it. If not supported assume that the controller | 1304 | * as supported send it. If not supported assume that the controller |
1305 | * does not have actual support for stored link keys which makes this | 1305 | * does not have actual support for stored link keys which makes this |
1306 | * command redundant anyway. | 1306 | * command redundant anyway. |
1307 | * | ||
1308 | * Some controllers indicate that they support handling deleting | ||
1309 | * stored link keys, but they don't. The quirk lets a driver | ||
1310 | * just disable this command. | ||
1307 | */ | 1311 | */ |
1308 | if (hdev->commands[6] & 0x80) { | 1312 | if (hdev->commands[6] & 0x80 && |
1313 | !test_bit(HCI_QUIRK_BROKEN_STORED_LINK_KEY, &hdev->quirks)) { | ||
1309 | struct hci_cp_delete_stored_link_key cp; | 1314 | struct hci_cp_delete_stored_link_key cp; |
1310 | 1315 | ||
1311 | bacpy(&cp.bdaddr, BDADDR_ANY); | 1316 | bacpy(&cp.bdaddr, BDADDR_ANY); |