Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3563751pxb; Mon, 25 Jan 2021 21:35:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJyM8DGApISSA4vnR/zl9neZAZqBdXK4Mjb3y+7V1Irylr8Y/B2nAsl63N6KYsJwNMu9fi4U X-Received: by 2002:a50:eacd:: with SMTP id u13mr3197031edp.382.1611639300482; Mon, 25 Jan 2021 21:35:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611639300; cv=none; d=google.com; s=arc-20160816; b=Z2FEM8YGap2f+VL6H3VQo+U6uf8djGqaV0v1IvRqAjCypei+ahNPSjeZSYp2AohUT5 RlKRDONZ9TXFrt5UFAviqicqIe6NUBjaS/oKX4f1bo+5amYuYYy1OcRFKT57VvtlFQlM nNPB4XzbnmA3GJFilaTJz0SGqRpj9ZBUvQOpXc5f65HiwskIKo5iNO93W3gY5ENdPBHH oDwIXRUvmACTQaiPM+8N1e9uUZ5CjAnINO8yYirrJrXf+6gdn6fH/Lz+8GjxyR3d6ekg Y9wra4ODl+YdTAWbV69yDV+Or4uYB7SupNF1q52aUKknBM8wTgdtxCZs85pjI4i8OrJu bnrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version; bh=WOl9vApALKIA+MTnemssmOvW3A6JE5pHsx6LP/YIJrg=; b=xKLdB1nWo5LZSfHJzXv+ja8QUTEEzXyijmmmVYEDfqxtasyb5CbKqHe81rqbQj2CyS wGTFLBICPdt1AZwAhKdj5How3N2sruSoHrLZdUnmXamCeYOUmRGmI6AlagMENUzwH2G7 Pl6ZRJZknk6N510KU4C++NxxWjAHQTA/Rllvi26QPAky0wQLAsBtUKzeL4Fmceb6C10O MC5FtBbVfGPaErubQpi4N6ic+4xxRDaKaAD0qmV12v0eIpSArx4OQhHHpVkdj8Y0d9Oz iimyz0c9HIatfOsnRKhOFzOiN/lj1fK62hq4OSIDaLY4SpbsnvD3wCcj56pD0O0sYtFY zB8Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z15si8076747edl.252.2021.01.25.21.34.23; Mon, 25 Jan 2021 21:35:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731773AbhAZFcU convert rfc822-to-8bit (ORCPT + 99 others); Tue, 26 Jan 2021 00:32:20 -0500 Received: from coyote.holtmann.net ([212.227.132.17]:43684 "EHLO mail.holtmann.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726902AbhAYSaX (ORCPT ); Mon, 25 Jan 2021 13:30:23 -0500 Received: from marcel-macbook.holtmann.net (p4ff9f11c.dip0.t-ipconnect.de [79.249.241.28]) by mail.holtmann.org (Postfix) with ESMTPSA id CE790CECCB; Mon, 25 Jan 2021 19:37:02 +0100 (CET) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.40.0.2.32\)) Subject: Re: [PATCH] Bluetooth: L2CAP: Try harder to accept device not knowing options From: Marcel Holtmann In-Reply-To: <20201208172912.4352-1-hadess@hadess.net> Date: Mon, 25 Jan 2021 19:29:37 +0100 Cc: Bluetooth Kernel Mailing List , Florian Dollinger Content-Transfer-Encoding: 8BIT Message-Id: References: <20201208172912.4352-1-hadess@hadess.net> To: Bastien Nocera X-Mailer: Apple Mail (2.3654.40.0.2.32) Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Bastien, > The current implementation of L2CAP options negotiation will continue > the negotiation when a device responds with L2CAP_CONF_UNACCEPT ("unaccepted > options"), but not when the device replies with L2CAP_CONF_UNKNOWN ("unknown > options"). > > Trying to continue the negotiation without ERTM support will allow > Bluetooth-capable XBox One controllers (notably models 1708 and 1797) > to connect. > > btmon before patch: >> ACL Data RX: Handle 256 flags 0x02 dlen 16 #64 [hci0] 59.182702 > L2CAP: Connection Response (0x03) ident 2 len 8 > Destination CID: 64 > Source CID: 64 > Result: Connection successful (0x0000) > Status: No further information available (0x0000) > < ACL Data TX: Handle 256 flags 0x00 dlen 23 #65 [hci0] 59.182744 > L2CAP: Configure Request (0x04) ident 3 len 15 > Destination CID: 64 > Flags: 0x0000 > Option: Retransmission and Flow Control (0x04) [mandatory] > Mode: Basic (0x00) > TX window size: 0 > Max transmit: 0 > Retransmission timeout: 0 > Monitor timeout: 0 > Maximum PDU size: 0 >> ACL Data RX: Handle 256 flags 0x02 dlen 16 #66 [hci0] 59.183948 > L2CAP: Configure Request (0x04) ident 1 len 8 > Destination CID: 64 > Flags: 0x0000 > Option: Maximum Transmission Unit (0x01) [mandatory] > MTU: 1480 > < ACL Data TX: Handle 256 flags 0x00 dlen 18 #67 [hci0] 59.183994 > L2CAP: Configure Response (0x05) ident 1 len 10 > Source CID: 64 > Flags: 0x0000 > Result: Success (0x0000) > Option: Maximum Transmission Unit (0x01) [mandatory] > MTU: 1480 >> ACL Data RX: Handle 256 flags 0x02 dlen 15 #69 [hci0] 59.187676 > L2CAP: Configure Response (0x05) ident 3 len 7 > Source CID: 64 > Flags: 0x0000 > Result: Failure - unknown options (0x0003) > 04 . > < ACL Data TX: Handle 256 flags 0x00 dlen 12 #70 [hci0] 59.187722 > L2CAP: Disconnection Request (0x06) ident 4 len 4 > Destination CID: 64 > Source CID: 64 >> ACL Data RX: Handle 256 flags 0x02 dlen 12 #73 [hci0] 59.192714 > L2CAP: Disconnection Response (0x07) ident 4 len 4 > Destination CID: 64 > Source CID: 64 > > btmon after patch: >> ACL Data RX: Handle 256 flags 0x02 dlen 16 #248 [hci0] 103.502970 > L2CAP: Connection Response (0x03) ident 5 len 8 > Destination CID: 65 > Source CID: 65 > Result: Connection pending (0x0001) > Status: No further information available (0x0000) >> ACL Data RX: Handle 256 flags 0x02 dlen 16 #249 [hci0] 103.504184 > L2CAP: Connection Response (0x03) ident 5 len 8 > Destination CID: 65 > Source CID: 65 > Result: Connection successful (0x0000) > Status: No further information available (0x0000) > < ACL Data TX: Handle 256 flags 0x00 dlen 23 #250 [hci0] 103.504398 > L2CAP: Configure Request (0x04) ident 6 len 15 > Destination CID: 65 > Flags: 0x0000 > Option: Retransmission and Flow Control (0x04) [mandatory] > Mode: Basic (0x00) > TX window size: 0 > Max transmit: 0 > Retransmission timeout: 0 > Monitor timeout: 0 > Maximum PDU size: 0 >> ACL Data RX: Handle 256 flags 0x02 dlen 16 #251 [hci0] 103.505472 > L2CAP: Configure Request (0x04) ident 3 len 8 > Destination CID: 65 > Flags: 0x0000 > Option: Maximum Transmission Unit (0x01) [mandatory] > MTU: 1480 > < ACL Data TX: Handle 256 flags 0x00 dlen 18 #252 [hci0] 103.505689 > L2CAP: Configure Response (0x05) ident 3 len 10 > Source CID: 65 > Flags: 0x0000 > Result: Success (0x0000) > Option: Maximum Transmission Unit (0x01) [mandatory] > MTU: 1480 >> ACL Data RX: Handle 256 flags 0x02 dlen 15 #254 [hci0] 103.509165 > L2CAP: Configure Response (0x05) ident 6 len 7 > Source CID: 65 > Flags: 0x0000 > Result: Failure - unknown options (0x0003) > 04 . > < ACL Data TX: Handle 256 flags 0x00 dlen 12 #255 [hci0] 103.509426 > L2CAP: Configure Request (0x04) ident 7 len 4 > Destination CID: 65 > Flags: 0x0000 > < ACL Data TX: Handle 256 flags 0x00 dlen 12 #257 [hci0] 103.511870 > L2CAP: Connection Request (0x02) ident 8 len 4 > PSM: 1 (0x0001) > Source CID: 66 >> ACL Data RX: Handle 256 flags 0x02 dlen 14 #259 [hci0] 103.514121 > L2CAP: Configure Response (0x05) ident 7 len 6 > Source CID: 65 > Flags: 0x0000 > Result: Success (0x0000) > > Signed-off-by: Florian Dollinger > Co-developed-by: Florian Dollinger > --- > net/bluetooth/l2cap_core.c | 1 + > 1 file changed, 1 insertion(+) patch has been applied to bluetooth-next tree. Regards Marcel