Linux-Bluetooth Archive on lore.kernel.org
 help / color / Atom feed
From: Andrey Smirnov <andrew.smirnov@gmail.com>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: linux-bluetooth@vger.kernel.org,
	"Pierre-Loup A . Griffais" <pgriffais@valvesoftware.com>,
	Florian Dollinger <dollinger.florian@gmx.de>,
	Johan Hedberg <johan.hedberg@gmail.com>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] Bluetooth: Retry configure request if result is L2CAP_CONF_UNKNOWN
Date: Thu, 11 Jul 2019 20:21:14 -0700
Message-ID: <CAHQ1cqF+8i1RPi77pXhGv4GRMoWMC0PpvJcEWcKH1O+CKuGWpg@mail.gmail.com> (raw)
In-Reply-To: <20190522013045.21678-1-andrew.smirnov@gmail.com>

On Tue, May 21, 2019 at 6:31 PM Andrey Smirnov <andrew.smirnov@gmail.com> wrote:
>
> Due to:
>
>  * Current implementation of l2cap_config_rsp() dropping BT
>    connection if sender of configuration response replied with unknown
>    option failure (Result=0x0003/L2CAP_CONF_UNKNOWN)
>
>  * Current implementation of l2cap_build_conf_req() adding
>    L2CAP_CONF_RFC(0x04) option to initial configure request sent by
>    the Linux host.
>
> devices that do no recongninze L2CAP_CONF_RFC, such as Xbox One S
> controllers, will get stuck in endless connect -> configure ->
> disconnect loop, never connect and be generaly unusable.
>
> To avoid this problem add code to do the following:
>
>  1. Parse the body of response L2CAP_CONF_UNKNOWN and, in case of
>     unsupported option being RFC, clear L2CAP_FEAT_ERTM and
>     L2CAP_FEAT_STREAMING from connection's feature mask (in order to
>     prevent RFC option from being added going forward)
>
>  2. Retry configuration step the same way it's done for
>     L2CAP_CONF_UNACCEPT
>
> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
> Cc: Pierre-Loup A. Griffais <pgriffais@valvesoftware.com>
> Cc: Florian Dollinger <dollinger.florian@gmx.de>
> Cc: Marcel Holtmann <marcel@holtmann.org>
> Cc: Johan Hedberg <johan.hedberg@gmail.com>
> Cc: linux-bluetooth@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> ---
>
> Changes since [v1]:
>
>    - Patch simplified to simply clear L2CAP_FEAT_ERTM |
>      L2CAP_FEAT_STREAMING from feat_mask when device flags RFC options
>      as unknown
>
> [v1] lore.kernel.org/r/20190208025828.30901-1-andrew.smirnov@gmail.com
>

Pinging the status of this. Marcel, do you have any feedback on v2?

Thanks,
Andrey Smirnov

      reply index

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-22  1:30 Andrey Smirnov
2019-07-12  3:21 ` Andrey Smirnov [this message]

Reply instructions:

You may reply publically 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=CAHQ1cqF+8i1RPi77pXhGv4GRMoWMC0PpvJcEWcKH1O+CKuGWpg@mail.gmail.com \
    --to=andrew.smirnov@gmail.com \
    --cc=dollinger.florian@gmx.de \
    --cc=johan.hedberg@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcel@holtmann.org \
    --cc=pgriffais@valvesoftware.com \
    /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

Linux-Bluetooth Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-bluetooth/0 linux-bluetooth/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-bluetooth linux-bluetooth/ https://lore.kernel.org/linux-bluetooth \
		linux-bluetooth@vger.kernel.org linux-bluetooth@archiver.kernel.org
	public-inbox-index linux-bluetooth


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-bluetooth


AGPL code for this site: git clone https://public-inbox.org/ public-inbox