aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/hci_core.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2011-04-28 11:29:02 -0700
committerGustavo F. Padovan <padovan@profusion.mobi>2011-04-28 16:14:42 -0300
commit4748fed2d1a2a7a816277754498b8aa70850e051 (patch)
treedb0204847255d2326f084790f637ba298d8fe5bc /net/bluetooth/hci_core.c
parent655fe6ece7e71b37c17577ae485d11bf701c95f7 (diff)
downloadkernel_samsung_smdk4412-4748fed2d1a2a7a816277754498b8aa70850e051.zip
kernel_samsung_smdk4412-4748fed2d1a2a7a816277754498b8aa70850e051.tar.gz
kernel_samsung_smdk4412-4748fed2d1a2a7a816277754498b8aa70850e051.tar.bz2
Bluetooth: Remove old_key_type from mgmt_ev_new_key
User space shouldn't have any need for the old key type so remove it from the corresponding Management interface event. 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.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 59ca475..60260ca 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -1097,14 +1097,15 @@ int hci_add_link_key(struct hci_dev *hdev, struct hci_conn *conn, int new_key,
bacpy(&key->bdaddr, bdaddr);
memcpy(key->val, val, 16);
- key->type = type;
key->pin_len = pin_len;
- if (new_key)
- mgmt_new_key(hdev->id, key, old_key_type);
-
if (type == HCI_LK_CHANGED_COMBINATION)
key->type = old_key_type;
+ else
+ key->type = type;
+
+ if (new_key)
+ mgmt_new_key(hdev->id, key);
return 0;
}