LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: Louis JANG <louis@mizi.com>
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: Tue, 26 Feb 2008 04:07:27 +0100	[thread overview]
Message-ID: <70692DDF-93B7-447E-ABEE-3CDBD94F15F1@holtmann.org> (raw)
In-Reply-To: <47C2A7FA.2060902@mizi.com>

Hi Louis,

> I fixed all of errors except 80 characters warning.
> Thanks
>
> Louis JANG
>
> Signed-off-by: Louis JANG <louis@mizi.com>
>
> --- 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.

> diff -uNr linux-2.6.23/include/net/bluetooth-orig/sco.h linux-2.6.23/ 
> include/net/bluetooth/sco.h
> --- linux-2.6.23/include/net/bluetooth-orig/sco.h	2007-10-10  
> 05:31:38.000000000 +0900
> +++ linux-2.6.23/include/net/bluetooth/sco.h	2008-02-25  
> 18:04:20.000000000 +0900
> @@ -51,6 +51,8 @@
> 	__u8  dev_class[3];
> };
>
> +#define SCO_FORCESCO	0x03
> +

NAK. We don't need this. And even if we really would want this, we  
would do it via extra parameters inside sockaddr_sco. In that case we  
would do it right and exposing eSCO settings and not some boolean  
parameter.

Regards

Marcel


  reply	other threads:[~2008-02-26  3:07 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <47666E1F.2000902@mizi.com>
2008-02-25  7:30 ` Dave Young
2008-02-25  7:34   ` 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 11:35       ` Louis JANG
2008-02-26  3:07         ` Marcel Holtmann [this message]
2008-02-26  3:53           ` Louis JANG
2008-02-26 19:43             ` Marcel Holtmann
2008-02-27  1:58               ` Louis JANG
2008-02-27  9:57                 ` Marcel Holtmann
2008-02-27 12:21                   ` Louis JANG
2008-02-27 15:21                     ` Marcel Holtmann
2008-02-28  2:49                       ` Louis JANG

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=70692DDF-93B7-447E-ABEE-3CDBD94F15F1@holtmann.org \
    --to=marcel@holtmann.org \
    --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=louis@mizi.com \
    --cc=netdev@vger.kernel.org \
    --subject='Re: [Bluez-devel] forcing SCO connection patch' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).