aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/hci_event.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2011-01-10 06:44:55 -0500
committerGustavo F. Padovan <padovan@profusion.mobi>2011-02-07 22:40:06 -0500
commitb0916ea0d9e6ea3ed46bb7a61c13a2b357b0248b (patch)
tree69f7d2ef2a09a9004de49e2203ea82bf644d3fd0 /net/bluetooth/hci_event.c
parenta5040efa2017f3e4f1b4d5f40fd989567f3994c1 (diff)
Bluetooth: Add controller side link key clearing to hci_init_req
The controller may have link keys in its own memory and these keys could be used for secure connections. However, since the interface to access these keys doesn't provide information about the key types (which would be needed to infer the level of security each key provides) using these keys is rather useless. Therefore, simply clear the controller side list in the initialization procedure. Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'net/bluetooth/hci_event.c')
-rw-r--r--net/bluetooth/hci_event.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index cf3014ae00e4..49b387cdcc38 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -557,6 +557,16 @@ static void hci_cc_write_ca_timeout(struct hci_dev *hdev, struct sk_buff *skb)
557 hci_req_complete(hdev, HCI_OP_WRITE_CA_TIMEOUT, status); 557 hci_req_complete(hdev, HCI_OP_WRITE_CA_TIMEOUT, status);
558} 558}
559 559
560static void hci_cc_delete_stored_link_key(struct hci_dev *hdev,
561 struct sk_buff *skb)
562{
563 __u8 status = *((__u8 *) skb->data);
564
565 BT_DBG("%s status 0x%x", hdev->name, status);
566
567 hci_req_complete(hdev, HCI_OP_DELETE_STORED_LINK_KEY, status);
568}
569
560static inline void hci_cs_inquiry(struct hci_dev *hdev, __u8 status) 570static inline void hci_cs_inquiry(struct hci_dev *hdev, __u8 status)
561{ 571{
562 BT_DBG("%s status 0x%x", hdev->name, status); 572 BT_DBG("%s status 0x%x", hdev->name, status);
@@ -1402,6 +1412,10 @@ static inline void hci_cmd_complete_evt(struct hci_dev *hdev, struct sk_buff *sk
1402 hci_cc_write_ca_timeout(hdev, skb); 1412 hci_cc_write_ca_timeout(hdev, skb);
1403 break; 1413 break;
1404 1414
1415 case HCI_OP_DELETE_STORED_LINK_KEY:
1416 hci_cc_delete_stored_link_key(hdev, skb);
1417 break;
1418
1405 default: 1419 default:
1406 BT_DBG("%s opcode 0x%x", hdev->name, opcode); 1420 BT_DBG("%s opcode 0x%x", hdev->name, opcode);
1407 break; 1421 break;