From: Louis JANG <louis@mizi.com>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: Dave Young <hidave.darkstar@gmail.com>,
linux-bluetooth@vger.kernel.org,
Linux Kernel <linux-kernel@vger.kernel.org>,
bmidgley@gmail.com, David Miller <davem@davemloft.net>,
Netdev <netdev@vger.kernel.org>
Subject: Re: [Bluez-devel] forcing SCO connection patch
Date: Wed, 27 Feb 2008 10:58:44 +0900 [thread overview]
Message-ID: <47C4C3D4.8010902@mizi.com> (raw)
In-Reply-To: <B96BD3FE-F490-4AD5-9315-ECD42CE9C728@holtmann.org>
[-- Attachment #1: Type: text/plain, Size: 1901 bytes --]
Marcel Holtmann 쓴 글:
> Hi Loius,
>
>>>> --- linux-2.6.23/net/bluetooth/hci_event.c.orig 2008-02-25
>>>> 17:17:11.000000000 +0900
>>>> +++ linux-2.6.23/net/bluetooth/hci_event.c 2008-02-25
>>>> 17:30:23.000000000 +0900
>>>> @@ -1313,8 +1313,17 @@
>>>> hci_dev_lock(hdev);
>>>>
>>>> conn = hci_conn_hash_lookup_ba(hdev, ev->link_type, &ev->bdaddr);
>>>> - if (!conn)
>>>> - goto unlock;
>>>> + if (!conn) {
>>>> + if (ev->link_type != ACL_LINK) {
>>>> + __u8 link_type = (ev->link_type == ESCO_LINK) ? SCO_LINK :
>>>> ESCO_LINK;
>>>> +
>>>> + conn = hci_conn_hash_lookup_ba(hdev, link_type, &ev->bdaddr);
>>>> + if (conn)
>>>> + conn->type = ev->link_type;
>>>> + }
>>>> + if (!conn)
>>>> + goto unlock;
>>>> + }
>>>
>>> NAK. There is no need to check for ACL_LINK. The sync_complete will
>>> only be called for SCO or eSCO connections.
>> I see. I removed this check line in the patch.
>>
>> Thanks.
>> Louis JANG
>> Signed-off-by: Louis JANG <louis@mizi.com>
>> --- linux-2.6.23/net/bluetooth/hci_event.c.orig 2008-02-26
>> 12:46:36.000000000 +0900
>> +++ linux-2.6.23/net/bluetooth/hci_event.c 2008-02-26
>> 12:47:23.000000000 +0900
>> @@ -1313,8 +1313,15 @@
>> hci_dev_lock(hdev);
>>
>> conn = hci_conn_hash_lookup_ba(hdev, ev->link_type, &ev->bdaddr);
>> - if (!conn)
>> - goto unlock;
>> + if (!conn) {
>> + __u8 link_type = (ev->link_type == ESCO_LINK) ? SCO_LINK : ESCO_LINK;
>> +
>> + conn = hci_conn_hash_lookup_ba(hdev, link_type, &ev->bdaddr);
>> + if (conn)
>> + conn->type = ev->link_type;
>> + else
>> + goto unlock;
>> + }
>>
>> if (!ev->status) {
>> conn->handle = __le16_to_cpu(ev->handle);
>
> do something like this:
>
> if (!conn) {
> ....
>
> conn = ....
> if (!conn)
> goto unlock;
>
> conn->type = ev->link_type;
> }
>
> And include a description when submitting a patch.
>
> Regards
>
> Marcel
I changed code with this style and included patch description.
Thanks
Louis JANG
[-- Attachment #2: patch_hci_event.c5 --]
[-- Type: text/plain, Size: 736 bytes --]
This patch is to handle different type of synchronous link is
estabilished with its request.
Signed-off-by: Louis JANG <louis@mizi.com>
--- linux-2.6.23/net/bluetooth/hci_event.c.orig 2008-02-26 12:46:36.000000000 +0900
+++ linux-2.6.23/net/bluetooth/hci_event.c 2008-02-27 10:48:29.000000000 +0900
@@ -1313,8 +1313,15 @@
hci_dev_lock(hdev);
conn = hci_conn_hash_lookup_ba(hdev, ev->link_type, &ev->bdaddr);
- if (!conn)
- goto unlock;
+ if (!conn) {
+ __u8 link_type = (ev->link_type == ESCO_LINK) ? SCO_LINK : ESCO_LINK;
+
+ conn = hci_conn_hash_lookup_ba(hdev, link_type, &ev->bdaddr);
+ if (!conn)
+ goto unlock;
+
+ conn->type = ev->link_type;
+ }
if (!ev->status) {
conn->handle = __le16_to_cpu(ev->handle);
WARNING: multiple messages have this Message-ID (diff)
From: Louis JANG <louis-6CAt/Z4uMM0@public.gmane.org>
To: Marcel Holtmann <marcel-kz+m5ild9QBg9hUCZPvPmw@public.gmane.org>
Cc: Dave Young
<hidave.darkstar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
linux-bluetooth-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Linux Kernel
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
bmidgley-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>,
Netdev <netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [Bluez-devel] forcing SCO connection patch
Date: Wed, 27 Feb 2008 10:58:44 +0900 [thread overview]
Message-ID: <47C4C3D4.8010902@mizi.com> (raw)
In-Reply-To: <B96BD3FE-F490-4AD5-9315-ECD42CE9C728-kz+m5ild9QBg9hUCZPvPmw@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 1921 bytes --]
Marcel Holtmann 쓴 글:
> Hi Loius,
>
>>>> --- linux-2.6.23/net/bluetooth/hci_event.c.orig 2008-02-25
>>>> 17:17:11.000000000 +0900
>>>> +++ linux-2.6.23/net/bluetooth/hci_event.c 2008-02-25
>>>> 17:30:23.000000000 +0900
>>>> @@ -1313,8 +1313,17 @@
>>>> hci_dev_lock(hdev);
>>>>
>>>> conn = hci_conn_hash_lookup_ba(hdev, ev->link_type, &ev->bdaddr);
>>>> - if (!conn)
>>>> - goto unlock;
>>>> + if (!conn) {
>>>> + if (ev->link_type != ACL_LINK) {
>>>> + __u8 link_type = (ev->link_type == ESCO_LINK) ? SCO_LINK :
>>>> ESCO_LINK;
>>>> +
>>>> + conn = hci_conn_hash_lookup_ba(hdev, link_type, &ev->bdaddr);
>>>> + if (conn)
>>>> + conn->type = ev->link_type;
>>>> + }
>>>> + if (!conn)
>>>> + goto unlock;
>>>> + }
>>>
>>> NAK. There is no need to check for ACL_LINK. The sync_complete will
>>> only be called for SCO or eSCO connections.
>> I see. I removed this check line in the patch.
>>
>> Thanks.
>> Louis JANG
>> Signed-off-by: Louis JANG <louis-6CAt/Z4uMM0@public.gmane.org>
>> --- linux-2.6.23/net/bluetooth/hci_event.c.orig 2008-02-26
>> 12:46:36.000000000 +0900
>> +++ linux-2.6.23/net/bluetooth/hci_event.c 2008-02-26
>> 12:47:23.000000000 +0900
>> @@ -1313,8 +1313,15 @@
>> hci_dev_lock(hdev);
>>
>> conn = hci_conn_hash_lookup_ba(hdev, ev->link_type, &ev->bdaddr);
>> - if (!conn)
>> - goto unlock;
>> + if (!conn) {
>> + __u8 link_type = (ev->link_type == ESCO_LINK) ? SCO_LINK : ESCO_LINK;
>> +
>> + conn = hci_conn_hash_lookup_ba(hdev, link_type, &ev->bdaddr);
>> + if (conn)
>> + conn->type = ev->link_type;
>> + else
>> + goto unlock;
>> + }
>>
>> if (!ev->status) {
>> conn->handle = __le16_to_cpu(ev->handle);
>
> do something like this:
>
> if (!conn) {
> ....
>
> conn = ....
> if (!conn)
> goto unlock;
>
> conn->type = ev->link_type;
> }
>
> And include a description when submitting a patch.
>
> Regards
>
> Marcel
I changed code with this style and included patch description.
Thanks
Louis JANG
[-- Attachment #2: patch_hci_event.c5 --]
[-- Type: text/plain, Size: 736 bytes --]
This patch is to handle different type of synchronous link is
estabilished with its request.
Signed-off-by: Louis JANG <louis@mizi.com>
--- linux-2.6.23/net/bluetooth/hci_event.c.orig 2008-02-26 12:46:36.000000000 +0900
+++ linux-2.6.23/net/bluetooth/hci_event.c 2008-02-27 10:48:29.000000000 +0900
@@ -1313,8 +1313,15 @@
hci_dev_lock(hdev);
conn = hci_conn_hash_lookup_ba(hdev, ev->link_type, &ev->bdaddr);
- if (!conn)
- goto unlock;
+ if (!conn) {
+ __u8 link_type = (ev->link_type == ESCO_LINK) ? SCO_LINK : ESCO_LINK;
+
+ conn = hci_conn_hash_lookup_ba(hdev, link_type, &ev->bdaddr);
+ if (!conn)
+ goto unlock;
+
+ conn->type = ev->link_type;
+ }
if (!ev->status) {
conn->handle = __le16_to_cpu(ev->handle);
next prev parent reply other threads:[~2008-02-27 1:59 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-17 12:39 [Bluez-devel] forcing SCO connection patch Louis JANG
2008-02-25 6:43 ` Brad Midgley
2008-02-25 6:56 ` Brad Midgley
2008-02-26 19:19 ` Guillaume Bedot
2008-02-26 19:28 ` Marcel Holtmann
2008-02-26 21:05 ` Guillaume Bedot
2008-02-25 7:30 ` Dave Young
2008-02-25 7:34 ` Dave Young
2008-02-25 8:26 ` Dave Young
2008-02-25 8:26 ` Dave Young
2008-02-25 9:28 ` Louis JANG
2008-02-25 9:55 ` Dave Young
2008-02-25 9:55 ` Dave Young
2008-02-25 11:35 ` Louis JANG
2008-02-25 11:35 ` Louis JANG
2008-02-26 3:07 ` Marcel Holtmann
2008-02-26 3:07 ` Marcel Holtmann
2008-02-26 3:53 ` Louis JANG
2008-02-26 19:43 ` Marcel Holtmann
2008-02-26 19:43 ` Marcel Holtmann
2008-02-27 1:58 ` Louis JANG [this message]
2008-02-27 1:58 ` Louis JANG
2008-02-27 9:57 ` Marcel Holtmann
2008-02-27 12:21 ` Louis JANG
2008-02-27 13:04 ` Guillaume Bedot
2008-02-27 15:21 ` Marcel Holtmann
2008-02-27 15:21 ` Marcel Holtmann
2008-02-28 2:49 ` Louis JANG
2008-02-28 2:49 ` Louis JANG
2008-02-28 10:57 ` Guillaume Bedot
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=47C4C3D4.8010902@mizi.com \
--to=louis@mizi.com \
--cc=bmidgley@gmail.com \
--cc=davem@davemloft.net \
--cc=hidave.darkstar@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcel@holtmann.org \
--cc=netdev@vger.kernel.org \
/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.