Bluetooth: Split HCI init sequence into three stages
authorJohan Hedberg <johan.hedberg@intel.com>
Tue, 5 Mar 2013 18:37:43 +0000 (20:37 +0200)
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>
Fri, 8 Mar 2013 13:40:25 +0000 (10:40 -0300)
commit2177bab507d2715ae3b745f47056eacd38b79fa7
treec247ec5fb757caadc79999c36d71564aa507b8ad
parent53cce22dc795e73fb48205e3f584f63f4c71c90c
Bluetooth: Split HCI init sequence into three stages

Having conditional command sending during a request has always been
problematic and caused hacks like the hdev->init_last_cmd variable. This
patch removes these conditionals and instead splits the init sequence
into three stages, each with its own __hci_req_sync() call.

This also paves the way to the upcoming asynchronous request support
swhich will also benefit by having a simpler implementation if it
doesn't need to cater for requests that change on the fly.

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>
net/bluetooth/hci_core.c
net/bluetooth/hci_event.c