aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/hci_core.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_core.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_core.c')
-rw-r--r--net/bluetooth/hci_core.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 183ce81f7a5..cedb8a966df 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -190,6 +190,7 @@ static void hci_reset_req(struct hci_dev *hdev, unsigned long opt)
190 190
191static void hci_init_req(struct hci_dev *hdev, unsigned long opt) 191static void hci_init_req(struct hci_dev *hdev, unsigned long opt)
192{ 192{
193 struct hci_cp_delete_stored_link_key cp;
193 struct sk_buff *skb; 194 struct sk_buff *skb;
194 __le16 param; 195 __le16 param;
195 __u8 flt_type; 196 __u8 flt_type;
@@ -260,6 +261,10 @@ static void hci_init_req(struct hci_dev *hdev, unsigned long opt)
260 /* Connection accept timeout ~20 secs */ 261 /* Connection accept timeout ~20 secs */
261 param = cpu_to_le16(0x7d00); 262 param = cpu_to_le16(0x7d00);
262 hci_send_cmd(hdev, HCI_OP_WRITE_CA_TIMEOUT, 2, &param); 263 hci_send_cmd(hdev, HCI_OP_WRITE_CA_TIMEOUT, 2, &param);
264
265 bacpy(&cp.bdaddr, BDADDR_ANY);
266 cp.delete_all = 1;
267 hci_send_cmd(hdev, HCI_OP_DELETE_STORED_LINK_KEY, sizeof(cp), &cp);
263} 268}
264 269
265static void hci_scan_req(struct hci_dev *hdev, unsigned long opt) 270static void hci_scan_req(struct hci_dev *hdev, unsigned long opt)