Updated patch bt-mice.diff: fix the famous BT headset issue
authorPali Rohár <pali.rohar@gmail.com>
Mon, 30 Jan 2012 19:37:41 +0000 (20:37 +0100)
committerPali Rohár <pali.rohar@gmail.com>
Mon, 30 Jan 2012 19:37:41 +0000 (20:37 +0100)
kernel-power-2.6.28/debian/patches/bt-mice.diff

index 0b5fd92..5a19c40 100644 (file)
@@ -1,15 +1,11 @@
---- kernel-power-2.6.28.orig/net/bluetooth/hci_event.c
-+++ kernel-power-2.6.28/net/bluetooth/hci_event.c
-@@ -1486,12 +1486,6 @@
-               conn->mode = ev->mode;
-               conn->interval = __le16_to_cpu(ev->interval);
+--- a/net/bluetooth/hci_conn.c 2012-01-30 12:53:26.208588006 -0500
++++ b/net/bluetooth/hci_conn.c 2012-01-30 12:45:59.891069000 -0500
+@@ -498,7 +498,7 @@
+       if (test_bit(HCI_RAW, &hdev->flags))
+               return;
  
--              if (!test_and_clear_bit(HCI_CONN_MODE_CHANGE_PEND, &conn->pend)) {
--                      if (conn->mode == HCI_CM_ACTIVE)
--                              conn->power_save = 1;
--                      else
--                              conn->power_save = 0;
--              }
-       }
+-      if (conn->mode != HCI_CM_SNIFF)
++      if (conn->mode != HCI_CM_SNIFF || (((conn->dev_class[1]&0x1f) == 0x05) && !conn->power_save))
+               goto timer;
  
-       hci_dev_unlock(hdev);
+       if (!test_and_set_bit(HCI_CONN_MODE_CHANGE_PEND, &conn->pend)) {