diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2012-02-22 11:17:32 -0500 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2012-02-23 06:06:59 -0500 |
commit | f51d5b248981d05269e4f83ab8f8ed7ed494fe33 (patch) | |
tree | fd7350c3921273e57073bb49bdadfd42f1e10060 /net/bluetooth/hci_event.c | |
parent | e59fda8dc14c173b74b5e9d5c8d72849d2ff6b5f (diff) |
Bluetooth: mgmt: Fix updating EIR when updating the name
Whenever we update the local device name the EIR data also needs to be
updated to reflect this. The update_eir() function in mgmt.c depends on
hdev->dev_name to be up to date so the patch also makes sure that the
mgmt function is called from hci_event.c after the update has happened.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth/hci_event.c')
-rw-r--r-- | net/bluetooth/hci_event.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index 498b71a0579a..e44e3fd68628 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c | |||
@@ -209,12 +209,12 @@ static void hci_cc_write_local_name(struct hci_dev *hdev, struct sk_buff *skb) | |||
209 | 209 | ||
210 | hci_dev_lock(hdev); | 210 | hci_dev_lock(hdev); |
211 | 211 | ||
212 | if (test_bit(HCI_MGMT, &hdev->dev_flags)) | ||
213 | mgmt_set_local_name_complete(hdev, sent, status); | ||
214 | |||
215 | if (status == 0) | 212 | if (status == 0) |
216 | memcpy(hdev->dev_name, sent, HCI_MAX_NAME_LENGTH); | 213 | memcpy(hdev->dev_name, sent, HCI_MAX_NAME_LENGTH); |
217 | 214 | ||
215 | if (test_bit(HCI_MGMT, &hdev->dev_flags)) | ||
216 | mgmt_set_local_name_complete(hdev, sent, status); | ||
217 | |||
218 | hci_dev_unlock(hdev); | 218 | hci_dev_unlock(hdev); |
219 | } | 219 | } |
220 | 220 | ||