summaryrefslogtreecommitdiffstats
path: root/hcid
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2005-04-30 18:46:01 +0000
committerMarcel Holtmann <marcel@holtmann.org>2005-04-30 18:46:01 +0000
commit58ceef5033eed699bfd7db9eaaf382823f2114ad (patch)
tree6ff28e1a8ef34ecb327884ba4a6f040eea1bfe3b /hcid
parent2bc66b1d0af2e2a01e545493510347578928ae33 (diff)
Read the stored link keys when starting the security manager
Diffstat (limited to 'hcid')
-rw-r--r--hcid/security.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/hcid/security.c b/hcid/security.c
index 5b2dc285..921875b3 100644
--- a/hcid/security.c
+++ b/hcid/security.c
@@ -584,6 +584,7 @@ void start_security_manager(int hdev)
GIOChannel *chan = io_chan[hdev];
struct hci_dev_info *di;
struct hci_filter flt;
+ read_stored_link_key_cp cp;
int dev;
if (chan)
@@ -635,6 +636,12 @@ void start_security_manager(int hdev)
io_security_event, (void *) di);
io_chan[hdev] = chan;
+
+ bacpy(&cp.bdaddr, BDADDR_ANY);
+ cp.read_all = 1;
+
+ hci_send_cmd(dev, OGF_HOST_CTL, OCF_READ_STORED_LINK_KEY,
+ READ_STORED_LINK_KEY_CP_SIZE, (void *) &cp);
}
void stop_security_manager(int hdev)