Bluetooth: btmrvl: enable RESET_ON_CLOSE quirk
authorBing Zhao <bzhao@marvell.com>
Mon, 3 Dec 2012 19:52:13 +0000 (11:52 -0800)
committerGerrit <chrome-bot@google.com>
Tue, 4 Dec 2012 19:16:06 +0000 (11:16 -0800)
When user brings down the HCI interface without explicitly
disconnecting the HID device(s) or resetting the HCI interface,
SD8797 firmware won't get the indication of "interface down".
This results that the SD8797 Wi-Fi stays at 1x1 mode without
switching back to 2x2 mode.

Work it around by setting RESET_ON_CLOSE bit to have the stack
reset the HCI interface upon close.

BUG=chrome-os-partner:14937
TEST=WiFi associates to 2.4GHz AP close enough; Bluetooth connects
to HID mouse; "iw mlan0 link" shows WiFi link tx bitrates at MCS7.
Uncheck "Enable bluetooth" checkbox, or issue "hciconfig hci0 down"
command, "iw mlan0 link" shows tx bitrates at MCS15 or MCS14.

Change-Id: Ic1468c3f60b504aa2efe80cbc72a22872b256f04
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/39163
Reviewed-by: Paul Stewart <pstew@chromium.org>
Reviewed-by: Scott James Remnant <keybuk@chromium.org>
drivers/bluetooth/btmrvl_main.c

index 681ca9d..16631d8 100644 (file)
@@ -562,6 +562,8 @@ int btmrvl_register_hdev(struct btmrvl_private *priv)
        hdev->send = btmrvl_send_frame;
        hdev->ioctl = btmrvl_ioctl;
 
+       set_bit(HCI_QUIRK_RESET_ON_CLOSE, &hdev->quirks);
+
        btmrvl_send_module_cfg_cmd(priv, MODULE_BRINGUP_REQ);
 
        hdev->dev_type = priv->btmrvl_dev.dev_type;