aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/mgmt.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2012-02-17 07:06:34 -0500
committerJohan Hedberg <johan.hedberg@intel.com>2012-02-17 07:39:16 -0500
commitd753fdc40f60da2eef03b4816392081a552fea5a (patch)
tree1ebfe8e4d39cd253345488f1645f6df1329d3700 /net/bluetooth/mgmt.c
parent42d2d87cfe837e987802588f8d8b119a76714a74 (diff)
Bluetooth: mgmt: Add address type to link key messages
The latest mgmt API includes an address type wherever there's an address present. This patch updates the link key messages to match it. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Acked-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth/mgmt.c')
-rw-r--r--net/bluetooth/mgmt.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 36c4ff6fdf05..b0de7194249e 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -1274,8 +1274,8 @@ static int load_link_keys(struct sock *sk, u16 index, void *data, u16 len)
1274 for (i = 0; i < key_count; i++) { 1274 for (i = 0; i < key_count; i++) {
1275 struct mgmt_link_key_info *key = &cp->keys[i]; 1275 struct mgmt_link_key_info *key = &cp->keys[i];
1276 1276
1277 hci_add_link_key(hdev, NULL, 0, &key->bdaddr, key->val, key->type, 1277 hci_add_link_key(hdev, NULL, 0, &key->addr.bdaddr, key->val,
1278 key->pin_len); 1278 key->type, key->pin_len);
1279 } 1279 }
1280 1280
1281 cmd_complete(sk, index, MGMT_OP_LOAD_LINK_KEYS, NULL, 0); 1281 cmd_complete(sk, index, MGMT_OP_LOAD_LINK_KEYS, NULL, 0);
@@ -2788,7 +2788,8 @@ int mgmt_new_link_key(struct hci_dev *hdev, struct link_key *key,
2788 memset(&ev, 0, sizeof(ev)); 2788 memset(&ev, 0, sizeof(ev));
2789 2789
2790 ev.store_hint = persistent; 2790 ev.store_hint = persistent;
2791 bacpy(&ev.key.bdaddr, &key->bdaddr); 2791 bacpy(&ev.key.addr.bdaddr, &key->bdaddr);
2792 ev.key.addr.type = MGMT_ADDR_BREDR;
2792 ev.key.type = key->type; 2793 ev.key.type = key->type;
2793 memcpy(ev.key.val, key->val, 16); 2794 memcpy(ev.key.val, key->val, 16);
2794 ev.key.pin_len = key->pin_len; 2795 ev.key.pin_len = key->pin_len;