]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
Bluetooth: mgmt: Fix name_changed event for short name changes
authorJohan Hedberg <johan.hedberg@intel.com>
Wed, 22 Feb 2012 19:39:58 +0000 (21:39 +0200)
committerJohan Hedberg <johan.hedberg@intel.com>
Thu, 23 Feb 2012 11:07:00 +0000 (13:07 +0200)
Since we can't reliably track the short name changes just assume that we
had a change whenever there's a pending mgmt command. In the worst case
we just get one unnecessary name_changed signal.

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

index 9c1f7714794d71fb5b8cb1b94701cfe925f60594..ee57edbb13ec9e932f58ab3dbca6d94cd3c1ea37 100644 (file)
@@ -3586,6 +3586,10 @@ int mgmt_set_local_name_complete(struct hci_dev *hdev, u8 *name, u8 status)
        if (!cmd)
                goto send_event;
 
+       /* Always assume that either the short or the complete name has
+        * changed if there was a pending mgmt command */
+       changed = true;
+
        if (status) {
                err = cmd_status(cmd->sk, hdev->id, MGMT_OP_SET_LOCAL_NAME,
                                                        mgmt_status(status));