All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Kiran Kumar Raparthy <kiran.kumar@linaro.org>,
	linux-kernel@vger.kernel.org
Cc: "hyungseoung.yoo" <hyungseoung.yoo@samsung.com>,
	Marcel Holtmann <marcel@holtmann.org>,
	Gustavo Padovan <gustavo@padovan.org>,
	Johan Hedberg <johan.hedberg@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	open@holtmann.org,
	list@holtmann.org:BLUETOOTH SUBSYSTEM
	<linux-bluetooth@vger.kernel.org>,
	"open list:NETWORKING [GENERAL]" <netdev@vger.kernel.org>,
	Android Kernel Team <kernel-team@android.com>,
	John Stultz <john.stultz@linaro.org>,
	Jaikumar Ganesh <jaikumarg@android.com>
Subject: Re: [RFC] Bluetooth: Keep master role when SCO or eSCO is active
Date: Wed, 28 May 2014 18:31:29 +0400	[thread overview]
Message-ID: <5385F341.1070508@cogentembedded.com> (raw)
In-Reply-To: <1401256588-1467-1-git-send-email-kiran.kumar@linaro.org>

Hello.

On 05/28/2014 09:56 AM, Kiran Kumar Raparthy wrote:

> From: "hyungseoung.yoo" <hyungseoung.yoo@samsung.com>

> Preserve the master role when SCO or eSCO is active
> as this improves compatability with lots of

    Compatibility.

> headset and chipset combinations.

> This is one of the number of patches from the Android AOSP
> common.git tree, which is used on almost all Android devices.
> It looks like it would improve support for compatibility with
> lot of headset,so I wanted to submit it for review to see
> if it should go upstream.

> Cc: Marcel Holtmann <marcel@holtmann.org> (maintainer:BLUETOOTH SUBSYSTEM)
> Cc: Gustavo Padovan <gustavo@padovan.org> (maintainer:BLUETOOTH SUBSYSTEM)
> Cc: Johan Hedberg <johan.hedberg@gmail.com> (maintainer:BLUETOOTH SUBSYSTEM)
> Cc: "David S. Miller" <davem@davemloft.net> (maintainer:NETWORKING [GENERAL])
> Cc: linux-bluetooth@vger.kernel.org (open list:BLUETOOTH SUBSYSTEM)
> Cc: netdev@vger.kernel.org (open list:NETWORKING [GENERAL])
> Cc: linux-kernel@vger.kernel.org (open list)
> Cc: Android Kernel Team <kernel-team@android.com>
> Cc: John Stultz <john.stultz@linaro.org>
> Signed-off-by: hyungseoung.yoo <hyungseoung.yoo@samsung.com>
> Signed-off-by: Jaikumar Ganesh <jaikumarg@android.com>
> [kiran: Added context to commit message]
> Signed-off-by: Kiran Raparthy <kiran.kumar@linaro.org>
> ---
>   net/bluetooth/hci_event.c | 12 +++++++++++-
>   1 file changed, 11 insertions(+), 1 deletion(-)

> diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
> index 15010a2..6f944d5 100644
> --- a/net/bluetooth/hci_event.c
> +++ b/net/bluetooth/hci_event.c
> @@ -1915,6 +1915,15 @@ unlock:
>   	hci_conn_check_pending(hdev);
>   }
>
> +static inline bool is_sco_active(struct hci_dev *hdev)
> +{
> +	if (hci_conn_hash_lookup_state(hdev, SCO_LINK, BT_CONNECTED) ||
> +			(hci_conn_hash_lookup_state(hdev, ESCO_LINK,

    () around function/macro invocation not needed (if this is a macro, 
consider enclosing its definition in parens instead). Also, this line should
start under 'hdev' on the previous one.

> +						    BT_CONNECTED)))
> +		return true;
> +	return false;
> +}
> +
>   static void hci_conn_request_evt(struct hci_dev *hdev, struct sk_buff *skb)
>   {
>   	struct hci_ev_conn_request *ev = (void *) skb->data;
> @@ -1961,7 +1970,8 @@ static void hci_conn_request_evt(struct hci_dev *hdev, struct sk_buff *skb)
>
>   			bacpy(&cp.bdaddr, &ev->bdaddr);
>
> -			if (lmp_rswitch_capable(hdev) && (mask & HCI_LM_MASTER))
> +			if (lmp_rswitch_capable(hdev) && ((mask & HCI_LM_MASTER)
> +						|| is_sco_active(hdev)))

   Don't start the line with ||, leave it on the previous line instead.

WBR, Sergei

      parent reply	other threads:[~2014-05-28 14:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-28  5:56 [RFC] Bluetooth: Keep master role when SCO or eSCO is active Kiran Kumar Raparthy
2014-05-28  5:56 ` Kiran Kumar Raparthy
2014-05-28  8:45 ` Luiz Augusto von Dentz
2014-05-28  8:45   ` Luiz Augusto von Dentz
2014-05-28 14:31 ` Sergei Shtylyov [this message]

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=5385F341.1070508@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=davem@davemloft.net \
    --cc=gustavo@padovan.org \
    --cc=hyungseoung.yoo@samsung.com \
    --cc=johan.hedberg@gmail.com \
    --cc=kiran.kumar@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=list@holtmann.org \
    --cc=marcel@holtmann.org \
    --cc=open@holtmann.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.