From: Marcel Holtmann <marcel@holtmann.org>
To: BlueZ users <bluez-users@lists.sourceforge.net>
Subject: Re: [Bluez-users] crazy mouse
Date: Sun, 11 Jun 2006 02:35:06 +0200 [thread overview]
Message-ID: <1149986106.5358.27.camel@aeonflux.holtmann.net> (raw)
In-Reply-To: <1149885500.17091.2.camel@neutrino.cosmos.net>
[-- Attachment #1: Type: text/plain, Size: 615 bytes --]
Hi Didier,
> > Hmm.. I can't see anything unusual. Only the automatic switch to sniff
> > mode feature trying to hold the connection in active mode and your
> > mouse turning it back to sniff mode. Could you give the 2.6.16-mh2 a
> > try? It doesn't contain the automatic switch to sniff mode feature and
> > we'll be able to see if that's causing your mouse problems.
>
> Yes that's it, my mouse workd perfect with mh2 !! I don't understand but
> if you want a tester for a newer patch just ask me ! :)
please use 2.6.16-mh1 and the attached patch. That should make it work
again as expected.
Regards
Marcel
[-- Attachment #2: patch --]
[-- Type: text/x-patch, Size: 1369 bytes --]
diff -u b/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
--- b/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -154,6 +154,7 @@
__u16 interval;
__u16 link_policy;
__u32 link_mode;
+ __u8 power_save;
unsigned long pend;
unsigned int sent;
diff -u b/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
--- b/net/bluetooth/hci_conn.c
+++ b/net/bluetooth/hci_conn.c
@@ -158,6 +158,8 @@
conn->mode = HCI_CM_ACTIVE;
conn->state = BT_OPEN;
+ conn->power_save = 1;
+
skb_queue_head_init(&conn->data_q);
init_timer(&conn->disc_timer);
@@ -387,7 +389,7 @@
if (test_bit(HCI_RAW, &hdev->flags))
return;
- if (conn->mode != HCI_CM_SNIFF)
+ if (conn->mode != HCI_CM_SNIFF || !conn->power_save)
goto timer;
if (!test_and_set_bit(HCI_CONN_MODE_CHANGE_PEND, &conn->pend)) {
diff -u b/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
--- b/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -881,7 +881,12 @@
conn->mode = ev->mode;
conn->interval = __le16_to_cpu(ev->interval);
- clear_bit(HCI_CONN_MODE_CHANGE_PEND, &conn->pend);
+ 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;
+ }
}
hci_dev_unlock(hdev);
[-- Attachment #3: Type: text/plain, Size: 0 bytes --]
[-- Attachment #4: Type: text/plain, Size: 164 bytes --]
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
next prev parent reply other threads:[~2006-06-11 0:35 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-05 21:42 [Bluez-users] crazy mouse Didier LINK
2006-06-05 21:57 ` Marcel Holtmann
2006-06-06 17:46 ` Didier LINK
2006-06-06 20:37 ` Ulisses Furquim
2006-06-08 20:26 ` Didier LINK
2006-06-09 1:14 ` Ulisses Furquim
2006-06-09 20:38 ` Didier LINK
2006-06-11 0:35 ` Marcel Holtmann [this message]
2006-06-11 9:24 ` Didier LINK
2006-06-11 13:41 ` Marcel Holtmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1149986106.5358.27.camel@aeonflux.holtmann.net \
--to=marcel@holtmann.org \
--cc=bluez-users@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox