diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2014-01-30 22:39:57 -0500 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2014-02-13 02:51:40 -0500 |
commit | f813f1be1f82a09720e94533f46ac79276eb037d (patch) | |
tree | 3648118cc4043f908b33e48340ff9d4978d06678 | |
parent | e834004b8a940ab28dace6043985ae2adf305661 (diff) |
Bluetooth: Fix long_term_keys debugfs output
The code was previously iterating the wrong list (and what's worse
casting entries to a type which they were not) and also missing a proper
line terminator when printing each entry. The code now also prints the
LTK type in hex for easier comparison with the kernel-defined values.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
-rw-r--r-- | net/bluetooth/hci_core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index 369d30750417..8094a41c9a26 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c | |||
@@ -620,9 +620,9 @@ static int long_term_keys_show(struct seq_file *f, void *ptr) | |||
620 | struct list_head *p, *n; | 620 | struct list_head *p, *n; |
621 | 621 | ||
622 | hci_dev_lock(hdev); | 622 | hci_dev_lock(hdev); |
623 | list_for_each_safe(p, n, &hdev->link_keys) { | 623 | list_for_each_safe(p, n, &hdev->long_term_keys) { |
624 | struct smp_ltk *ltk = list_entry(p, struct smp_ltk, list); | 624 | struct smp_ltk *ltk = list_entry(p, struct smp_ltk, list); |
625 | seq_printf(f, "%pMR (type %u) %u %u %u %.4x %*phN %*phN\\n", | 625 | seq_printf(f, "%pMR (type %u) %u 0x%02x %u %.4x %*phN %*phN\n", |
626 | <k->bdaddr, ltk->bdaddr_type, ltk->authenticated, | 626 | <k->bdaddr, ltk->bdaddr_type, ltk->authenticated, |
627 | ltk->type, ltk->enc_size, __le16_to_cpu(ltk->ediv), | 627 | ltk->type, ltk->enc_size, __le16_to_cpu(ltk->ediv), |
628 | 8, ltk->rand, 16, ltk->val); | 628 | 8, ltk->rand, 16, ltk->val); |