Bluetooth: Refactor hci_disconn_complete_evt
authorAndre Guedes <andre.guedes@openbossa.org>
Thu, 7 Nov 2013 20:36:10 +0000 (17:36 -0300)
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>
Wed, 4 Dec 2013 13:09:04 +0000 (11:09 -0200)
commit3846220b0df414816d00365cec559ff3c8b7c4bf
tree885feba756eed1a596f0c2d4ec68c67fb71561dc
parentabf54a506d06e0b3ba2c408040e647791af37937
Bluetooth: Refactor hci_disconn_complete_evt

hci_disconn_complete_evt() logic is more complicated than what it
should be, making it hard to follow and add new features.

So this patch does some code refactoring by handling the error cases
in the beginning of the function and by moving the main flow into the
first level of function scope. No change is done in the event handling
logic itself.

Besides organizing this messy code, this patch makes easier to add
code for handling LE auto connection (which will be added in a further
patch).

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
net/bluetooth/hci_event.c
This page took 0.043183 seconds and 5 git commands to generate.