Bluetooth: Set DISCOVERY_STOPPED if controller resets
Bluetooth: Set DISCOVERY_STOPPED if controller resets

If controller is reset during the discovery procedure, Start Discovery
command stops working. This can be easily reproduced by running
"hciconfig hci0 reset" while discovering devices, for instance.

We should force discovery state to DISCOVERY_STOPPED in case we receive
a reset command complete event. Otherwise we may stuck in one of the
active discovery states (DISCOVERY_INQUIRY, DISCOVERY_LE_SCAN and
DISCOVERY_RESOLVING) and subsequent Start Discovery commands will simply
fail.

Signed-off-by: Andre Guedes <282d5d3bbdb7014316a30ab22daf425f10cd096c@openbossa.org>
Acked-by: Marcel Holtmann <44592b4eea36663c86b994bb0ea99d15309c1c7d@holtmann.org>
Signed-off-by: Johan Hedberg <628991c7b0a19c384f9b99c21ec330ce952bb838@intel.com>

KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs