• Andre Guedes's avatar
    Bluetooth: Refactor hci_disconn_complete_evt · 3846220b
    Andre Guedes authored
    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: default avatarAndre Guedes <andre.guedes@openbossa.org>
    Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
    3846220b
hci_event.c 88.8 KB