Bluetooth: Rename authentication to key_type in mgmt_ltk_info
authorMarcel Holtmann <marcel@holtmann.org>
Sat, 1 Feb 2014 02:42:17 +0000 (18:42 -0800)
committerJohan Hedberg <johan.hedberg@intel.com>
Thu, 13 Feb 2014 07:51:43 +0000 (09:51 +0200)
The field is not a boolean, it is actually a field for a key type. So
name it properly.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
include/net/bluetooth/mgmt.h
net/bluetooth/mgmt.c

index dfab094fab7311948da3fda9eb5b438a99beca55..4303fa90b7c111d2c0efc4c046b8bf093a6b1ef5 100644 (file)
@@ -182,7 +182,7 @@ struct mgmt_cp_load_link_keys {
 
 struct mgmt_ltk_info {
        struct mgmt_addr_info addr;
-       __u8    authenticated;
+       __u8    type;
        __u8    master;
        __u8    enc_size;
        __le16  ediv;
index 8030eeb44382638cc2e1834a3b1bc8022a09d536..8c94841072a8f02601072cce9b7ff750142c6608 100644 (file)
@@ -4207,7 +4207,7 @@ static int load_long_term_keys(struct sock *sk, struct hci_dev *hdev,
                        type = HCI_SMP_LTK_SLAVE;
 
                hci_add_ltk(hdev, &key->addr.bdaddr, addr_type,
-                           type, 0, key->authenticated, key->val,
+                           type, 0, key->type, key->val,
                            key->enc_size, key->ediv, key->rand);
        }
 
@@ -4648,7 +4648,7 @@ void mgmt_new_ltk(struct hci_dev *hdev, struct smp_ltk *key, u8 persistent)
        ev.store_hint = persistent;
        bacpy(&ev.key.addr.bdaddr, &key->bdaddr);
        ev.key.addr.type = link_to_bdaddr(LE_LINK, key->bdaddr_type);
-       ev.key.authenticated = key->authenticated;
+       ev.key.type = key->authenticated;
        ev.key.enc_size = key->enc_size;
        ev.key.ediv = key->ediv;