]> git.baikalelectronics.ru Git - kernel.git/commit
Bluetooth: mgmt: Fix device_connected sending order
authorJohan Hedberg <johan.hedberg@intel.com>
Sat, 12 May 2012 19:11:50 +0000 (16:11 -0300)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 14 May 2012 17:56:15 +0000 (13:56 -0400)
commitc23d57c3bf1e2ea8edd75b819ccef4179e99dcc1
tree89ee980737493ce6247b3a454636e48bd488e1c7
parent430247aae65917f8c735b3b0f3b74e2237dc2e1b
Bluetooth: mgmt: Fix device_connected sending order

The mgmt_ev_device_connected signal must be sent before any event
indications happen for sockets associated with the connection. Otherwise
e.g. device authorization for the sockets will fail with ENOTCONN as
user space things that there is no baseband link.

This patch fixes the issue by ensuring that the device_connected event
if sent (if it hasn't been so already) as soon as the first ACL data
packet arrives from the remote device.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/bluetooth/hci_core.c
net/bluetooth/hci_event.c