From: Marcel Holtmann <marcel@holtmann.org>
To: BlueZ users <bluez-users@lists.sourceforge.net>
Subject: Re: [Bluez-users] L2CAP disconnect problem
Date: Fri, 24 Nov 2006 18:25:20 +0100 [thread overview]
Message-ID: <1164389120.28284.22.camel@localhost> (raw)
In-Reply-To: <019001c70fa5$dbf8e1d0$8935c70a@dlh.st.com>
[-- Attachment #1: Type: text/plain, Size: 360 bytes --]
Hi Sumeet,
> I have attached the kernel messages log as well as the HCI log. There is no
> ACL Disconnect after L2CAP disc response.
the problem is that we didn't create the ACL link and so we feel not
responsible for cleaning up. However with the following patch that went
into the 2.6 kernel series a long time ago, this will be solved.
Regards
Marcel
[-- Attachment #2: patch-hci-disconnect --]
[-- Type: text/plain, Size: 1543 bytes --]
# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
# 2004/01/13 04:17:12+01:00 marcel@holtmann.org
# [Bluetooth] Set disconnect timer for incoming ACL links
#
# In general a Bluetooth stack that creates an ACL link should also take
# care of its termination, but some Bluetooth devices think otherwise. The
# problem is that the Bluetooth specification don't defines an ownership
# of an ACL link and if nobody cares about it, two devices stay connected
# even if there is no need. To avoid leftover ACL links the disconnect
# timer must also be used for incoming connections, but it is set twice
# the default disconnect timeout so the other side get enough time to
# clean everything by itself.
#
# include/net/bluetooth/hci_core.h
# 2004/01/13 04:15:32+01:00 marcel@holtmann.org +5 -3
# Set disconnect timer for incoming ACL links
#
diff -Nru a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
--- a/include/net/bluetooth/hci_core.h Tue Jan 13 04:39:32 2004
+++ b/include/net/bluetooth/hci_core.h Tue Jan 13 04:39:32 2004
@@ -281,10 +281,12 @@
static inline void hci_conn_put(struct hci_conn *conn)
{
if (atomic_dec_and_test(&conn->refcnt)) {
- if (conn->type == SCO_LINK)
+ if (conn->type == ACL_LINK) {
+ unsigned long timeo = (conn->out) ?
+ HCI_DISCONN_TIMEOUT : HCI_DISCONN_TIMEOUT * 2;
+ hci_conn_set_timer(conn, timeo);
+ } else
hci_conn_set_timer(conn, HZ / 100);
- else if (conn->out)
- hci_conn_set_timer(conn, HCI_DISCONN_TIMEOUT);
}
}
[-- Attachment #3: Type: text/plain, Size: 347 bytes --]
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
[-- 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-11-24 17:25 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-20 11:45 [Bluez-users] L2CAP disconnect problem Sumeet VERMA
2006-11-20 12:40 ` Marcel Holtmann
2006-11-21 7:16 ` Sumeet VERMA
2006-11-21 7:27 ` Marcel Holtmann
2006-11-22 5:43 ` Sumeet VERMA
2006-11-22 6:23 ` Marcel Holtmann
2006-11-24 5:59 ` Sumeet VERMA
2006-11-24 6:14 ` Marcel Holtmann
2006-11-24 6:27 ` Sumeet VERMA
2006-11-24 7:15 ` Sumeet VERMA
2006-11-24 7:31 ` Marcel Holtmann
2006-11-24 8:52 ` Sumeet VERMA
2006-11-24 17:25 ` Marcel Holtmann [this message]
2006-11-24 8:53 ` Sumeet VERMA
2006-11-24 9:01 ` Sumeet VERMA
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=1164389120.28284.22.camel@localhost \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.