aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/mgmt.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2014-06-24 06:15:49 -0400
committerMarcel Holtmann <marcel@holtmann.org>2014-07-03 11:42:45 -0400
commit7652ff6aeaf0eeaec1f2e7e2f3ce0e588447dbd1 (patch)
tree6e21e9d9386f1763d4e604e43e5fe08e3595d01d /net/bluetooth/mgmt.c
parent567fa2aa3dfad9848c25a226927a4ca5f94229ac (diff)
Bluetooth: Move mgmt event sending out from hci_add_link_key()
There are two callers of hci_add_link_key(). The first one is the HCI Link Key Notification event and the second one the mgmt code that receives a list of link keys from user space. Previously we've had the hci_add_link_key() function being responsible for also emitting a mgmt signal but for the latter use case this should not happen. Because of this a rather awkward new_key paramter has been passed to the function. This patch moves the mgmt event sending out from the hci_add_link_key() function, thereby making the code a bit more understandable. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth/mgmt.c')
-rw-r--r--net/bluetooth/mgmt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index e1651c3fc676..bb5b04191253 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -2424,8 +2424,8 @@ static int load_link_keys(struct sock *sk, struct hci_dev *hdev, void *data,
2424 for (i = 0; i < key_count; i++) { 2424 for (i = 0; i < key_count; i++) {
2425 struct mgmt_link_key_info *key = &cp->keys[i]; 2425 struct mgmt_link_key_info *key = &cp->keys[i];
2426 2426
2427 hci_add_link_key(hdev, NULL, 0, &key->addr.bdaddr, key->val, 2427 hci_add_link_key(hdev, NULL, &key->addr.bdaddr, key->val,
2428 key->type, key->pin_len); 2428 key->type, key->pin_len, NULL);
2429 } 2429 }
2430 2430
2431 cmd_complete(sk, hdev->id, MGMT_OP_LOAD_LINK_KEYS, 0, NULL, 0); 2431 cmd_complete(sk, hdev->id, MGMT_OP_LOAD_LINK_KEYS, 0, NULL, 0);