Bluetooth: AMP: Mark controller radio powered down after HCIDEVDOWN
authorAndrei Emeltchenko <andrei.emeltchenko@intel.com>
Wed, 28 Nov 2012 15:59:42 +0000 (17:59 +0200)
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>
Mon, 3 Dec 2012 17:59:59 +0000 (15:59 -0200)
After getting HCIDEVDOWN controller did not mark itself as 0x00 which
means: "The Controller radio is available but is currently physically
powered down". The result was even if the hdev was down we return
in controller list value 0x01 "status 0x01 (Bluetooth only)".

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
net/bluetooth/hci_core.c

index 69eb644..ec7d3a7 100644 (file)
@@ -861,6 +861,9 @@ static int hci_dev_do_close(struct hci_dev *hdev)
        /* Clear flags */
        hdev->flags = 0;
 
+       /* Controller radio is available but is currently powered down */
+       hdev->amp_status = 0;
+
        memset(hdev->eir, 0, sizeof(hdev->eir));
        memset(hdev->dev_class, 0, sizeof(hdev->dev_class));