linux/net/bluetooth
Johan Hedberg 1392897139 Bluetooth: Fix waiting for EIR update when setting local name
We shouldn't respond to the mgmt_set_local_name command until all
related HCI commands have completed. This patch fixes the issue by
running the local name HCI command and the EIR update in the same
asynchronous request, and returning the mgmt command complete through
the complete callback of the request.

The downside of this is that we must set hdev->dev_name before the local
name HCI command has completed since otherwise the generated EIR
command doesn't contain the new name. This means that we can no-longer
reliably detect when the name has really changed and when not. Luckily
this only affects scenarios where the mgmt interface is *not* used (e.g.
hciconfig) so redundant mgmt_ev_local_name_changed events in these cases
are an acceptable drawback.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
2013-03-18 14:02:03 -03:00
..
bnep Bluetooth: discard bt_sock_unregister() errors 2013-03-08 10:38:44 -03:00
cmtp Bluetooth: discard bt_sock_unregister() errors 2013-03-08 10:38:44 -03:00
hidp Bluetooth: discard bt_sock_unregister() errors 2013-03-08 10:38:44 -03:00
rfcomm Bluetooth: Remove redundant RFCOMM BT_CLOSED settings 2013-03-08 10:40:25 -03:00
a2mp.c Bluetooth: Replaced kzalloc and memcpy with kmemdup 2013-03-18 14:01:50 -03:00
af_bluetooth.c Bluetooth: change bt_sock_unregister() to return void 2013-03-08 10:38:44 -03:00
amp.c Bluetooth: AMP: Use set_bit / test_bit for amp_mgr state 2013-01-09 17:05:05 -02:00
hci_conn.c Bluetooth: Rename hci_acl_disconn 2013-03-08 10:38:43 -03:00
hci_core.c Bluetooth: Fix clearing flags on power off before notifying mgmt 2013-03-18 14:02:03 -03:00
hci_event.c Bluetooth: Add a define for the HCI persistent flags mask 2013-03-18 14:02:02 -03:00
hci_sock.c Bluetooth: Fix stand-alone HCI command handling 2013-03-08 10:40:26 -03:00
hci_sysfs.c Bluetooth: Use PTR_RET function 2013-03-18 11:56:15 -03:00
Kconfig Bluetooth: trivial: Remove newline before EOF 2012-10-24 00:42:47 -02:00
l2cap_core.c Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next 2013-01-30 14:21:04 -05:00
l2cap_sock.c Bluetooth: discard bt_sock_unregister() errors 2013-03-08 10:38:44 -03:00
lib.c bluetooth: Remove unneeded batostr function 2012-09-27 18:10:43 -03:00
Makefile Bluetooth: AMP: Use HCI cmd to Read Loc AMP Assoc 2012-09-27 17:10:32 -03:00
mgmt.c Bluetooth: Fix waiting for EIR update when setting local name 2013-03-18 14:02:03 -03:00
sco.c Bluetooth: discard bt_sock_unregister() errors 2013-03-08 10:38:44 -03:00
smp.c Bluetooth: Fix handling of unexpected SMP PDUs 2013-01-31 15:35:42 -02:00