]> xenbits.xensource.com Git - people/aperard/linux-chromebook.git/commitdiff
UPSTREAM: Bluetooth: Rename HCI_QUIRK_NO_RESET to HCI_QUIRK_RESET_ON_CLOSE
authorBing Zhao <bzhao@marvell.com>
Mon, 3 Dec 2012 19:38:10 +0000 (11:38 -0800)
committerGerrit <chrome-bot@google.com>
Tue, 4 Dec 2012 19:16:05 +0000 (11:16 -0800)
HCI_QUIRK_NO_RESET name is misleading - purpose of this quirk is to
reset device on close instead of init, not to not reset at all.
Rename it to HCI_QUIRK_RESET_ON_CLOSE to avoid confusion.

Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
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: Ib83bdea24c9820efe321c02f10ffce43c42368e5
Reviewed-on: https://gerrit.chromium.org/gerrit/39162
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Ready: Bing Zhao <bzhao@marvell.com>
Tested-by: Bing Zhao <bzhao@marvell.com>
Reviewed-by: Scott James Remnant <keybuk@chromium.org>
drivers/bluetooth/bpa10x.c
drivers/bluetooth/btusb.c
drivers/bluetooth/hci_ldisc.c
include/net/bluetooth/hci.h
net/bluetooth/hci_core.c

index d894340a7601ee789eff108b1dddd29e173b157f..457f4e60279698140d316f2c909efddbbd26cfb7 100644 (file)
@@ -470,7 +470,7 @@ static int bpa10x_probe(struct usb_interface *intf, const struct usb_device_id *
        hdev->flush    = bpa10x_flush;
        hdev->send     = bpa10x_send_frame;
 
-       set_bit(HCI_QUIRK_NO_RESET, &hdev->quirks);
+       set_bit(HCI_QUIRK_RESET_ON_CLOSE, &hdev->quirks);
 
        err = hci_register_dev(hdev);
        if (err < 0) {
index 2fbef76c2e760590163772e988c827889457bef6..b5cbe27c6e230543e165ad8879bdfc027b5c95e3 100644 (file)
@@ -1019,7 +1019,7 @@ static int btusb_probe(struct usb_interface *intf,
        data->isoc = usb_ifnum_to_if(data->udev, 1);
 
        if (!reset)
-               set_bit(HCI_QUIRK_NO_RESET, &hdev->quirks);
+               set_bit(HCI_QUIRK_RESET_ON_CLOSE, &hdev->quirks);
 
        if (force_scofix || id->driver_info & BTUSB_WRONG_SCO_MTU) {
                if (!disable_scofix)
@@ -1031,7 +1031,7 @@ static int btusb_probe(struct usb_interface *intf,
 
        if (id->driver_info & BTUSB_DIGIANSWER) {
                data->cmdreq_type = USB_TYPE_VENDOR;
-               set_bit(HCI_QUIRK_NO_RESET, &hdev->quirks);
+               set_bit(HCI_QUIRK_RESET_ON_CLOSE, &hdev->quirks);
        }
 
        if (id->driver_info & BTUSB_CSR) {
@@ -1039,7 +1039,7 @@ static int btusb_probe(struct usb_interface *intf,
 
                /* Old firmware would otherwise execute USB reset */
                if (le16_to_cpu(udev->descriptor.bcdDevice) < 0x117)
-                       set_bit(HCI_QUIRK_NO_RESET, &hdev->quirks);
+                       set_bit(HCI_QUIRK_RESET_ON_CLOSE, &hdev->quirks);
        }
 
        if (id->driver_info & BTUSB_SNIFFER) {
index 98a8c05d4f23a038dfa020cd98930c9d52283844..b598d26fba7e36d7f62238493c065032e256902f 100644 (file)
@@ -394,7 +394,7 @@ static int hci_uart_register_dev(struct hci_uart *hu)
                set_bit(HCI_QUIRK_RAW_DEVICE, &hdev->quirks);
 
        if (!test_bit(HCI_UART_RESET_ON_INIT, &hu->hdev_flags))
-               set_bit(HCI_QUIRK_NO_RESET, &hdev->quirks);
+               set_bit(HCI_QUIRK_RESET_ON_CLOSE, &hdev->quirks);
 
        if (test_bit(HCI_UART_CREATE_AMP, &hu->hdev_flags))
                hdev->dev_type = HCI_AMP;
index d47e523c9d83387460f905414952d81c54b8361e..3ee63d355d20594427667f1fd570b43ae08e06fc 100644 (file)
@@ -58,7 +58,7 @@
 
 /* HCI device quirks */
 enum {
-       HCI_QUIRK_NO_RESET,
+       HCI_QUIRK_RESET_ON_CLOSE,
        HCI_QUIRK_RAW_DEVICE,
        HCI_QUIRK_FIXUP_BUFFER_SIZE
 };
index d6dc44cd15b0729a90bc8963ae90182353ed7e10..82efae5e6b0037cbb6f8dc1a082480e4f5e5a4d3 100644 (file)
@@ -201,7 +201,7 @@ static void bredr_init(struct hci_dev *hdev)
        /* Mandatory initialization */
 
        /* Reset */
-       if (!test_bit(HCI_QUIRK_NO_RESET, &hdev->quirks)) {
+       if (!test_bit(HCI_QUIRK_RESET_ON_CLOSE, &hdev->quirks)) {
                set_bit(HCI_RESET, &hdev->flags);
                hci_send_cmd(hdev, HCI_OP_RESET, 0, NULL);
        }
@@ -788,7 +788,7 @@ static int hci_dev_do_close(struct hci_dev *hdev)
        skb_queue_purge(&hdev->cmd_q);
        atomic_set(&hdev->cmd_cnt, 1);
        if (!test_bit(HCI_RAW, &hdev->flags) &&
-                               test_bit(HCI_QUIRK_NO_RESET, &hdev->quirks)) {
+                               test_bit(HCI_QUIRK_RESET_ON_CLOSE, &hdev->quirks)) {
                set_bit(HCI_INIT, &hdev->flags);
                __hci_request(hdev, hci_reset_req, 0,
                                        msecs_to_jiffies(250));