diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2012-02-22 14:39:58 -0500 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2012-02-23 06:07:00 -0500 |
commit | 7bdaae4a4bc075cf73ab9c3a531b7229caa1f49e (patch) | |
tree | 0a27c9ffc511019b667be1679622975449c00167 /net/bluetooth | |
parent | 28cc7bde5978cbc58c9026123fa5f33b62ad66b3 (diff) |
Bluetooth: mgmt: Fix name_changed event for short name changes
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>
Diffstat (limited to 'net/bluetooth')
-rw-r--r-- | net/bluetooth/mgmt.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 9c1f7714794d..ee57edbb13ec 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c | |||
@@ -3586,6 +3586,10 @@ int mgmt_set_local_name_complete(struct hci_dev *hdev, u8 *name, u8 status) | |||
3586 | if (!cmd) | 3586 | if (!cmd) |
3587 | goto send_event; | 3587 | goto send_event; |
3588 | 3588 | ||
3589 | /* Always assume that either the short or the complete name has | ||
3590 | * changed if there was a pending mgmt command */ | ||
3591 | changed = true; | ||
3592 | |||
3589 | if (status) { | 3593 | if (status) { |
3590 | err = cmd_status(cmd->sk, hdev->id, MGMT_OP_SET_LOCAL_NAME, | 3594 | err = cmd_status(cmd->sk, hdev->id, MGMT_OP_SET_LOCAL_NAME, |
3591 | mgmt_status(status)); | 3595 | mgmt_status(status)); |