Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp2525234ybk; Mon, 18 May 2020 01:01:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyF3e2G8IisMFpTx6FT4aLlgQSokRZ1BYLxTOGDqr0qDnpZkC1uNPYNqm+Hq3YFInZC+bs2 X-Received: by 2002:a05:6402:1817:: with SMTP id g23mr12906422edy.132.1589788916925; Mon, 18 May 2020 01:01:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589788916; cv=none; d=google.com; s=arc-20160816; b=RuRLdxOMgakLuW+uCd7Tsb5T2ZF5lDDjQs4O3Ih8SdQrWk5F9Tn9yu3z606NUSyQpN K3DuyyMWNhSYmZHkP/7Mm22zLTo31dnQHBDGwZJ+EWVDASqB+zHwWN9in6qxVTc3jSuW 5SmV2xpfTKSU5kqqG/uKCY8gBA9ocHC8ZBC2XR1mowfRLHzLv0WOGsUjh6GY28Yl6p9o tD7uNT949q1JveUgLBhSRDDuS8ikx16ZLHA40O9aa9/q008q3V0Nf0Zj2EXi1rxXBSaj cHOjMYe/r1I3eWXmHah0aAuY8zYO9n8tnFcZ2E/i9cU4upUuefP8iUiXdCWjHAg5F7hL f5TQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version; bh=xWQ8MDYPOhaNffsZfk8lje0pMMY0H0K9UEH7yauu/+0=; b=qnhjFuiMdxFACH2CG36BSaY7AqHSd0sC6fNcKaTEDgmwyTragQZc4Wfe4+zTmv9v3q ADcb7V9EdqMePwsGIV3/7/SvY2SOELf8gwcJpPM4BY2ZWkiCYSLk9qF7dAjS4iDS+xXV b/TY0v16+eqIB18A7YBW/IZnRDg3NMZSn8VsWF9+wR11rlFy/73lNSnMB1Uw1OnFir61 Uu8R3C/HbN35J65LSWKlhH5Q1my6996W7irnbfEolW4RAuvzQoxFkF5xN2QUal667tom oNj2BpCgKnUe9rrhARfmnMaYJifTx83/bC07b4uj/VxqhZTU1nLeB0ETMDBGvvX8YiZV G6cw== 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 ov7si6228758ejb.409.2020.05.18.01.01.32; Mon, 18 May 2020 01:01:56 -0700 (PDT) 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 S1727033AbgERIBP (ORCPT + 99 others); Mon, 18 May 2020 04:01:15 -0400 Received: from coyote.holtmann.net ([212.227.132.17]:40079 "EHLO mail.holtmann.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726489AbgERIBP (ORCPT ); Mon, 18 May 2020 04:01:15 -0400 Received: from marcel-macbook.fritz.box (p4FEFC5A7.dip0.t-ipconnect.de [79.239.197.167]) by mail.holtmann.org (Postfix) with ESMTPSA id 49EE7CECE2; Mon, 18 May 2020 10:10:57 +0200 (CEST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: Re: [PATCH] Bluetooth: Add SCO fallback for invalid LMP parameters error From: Marcel Holtmann In-Reply-To: <20200515092704.902-1-hychao@google.com> Date: Mon, 18 May 2020 10:01:13 +0200 Cc: linux-bluetooth@vger.kernel.org, chromeos-bluetooth-upstreaming@chromium.org, alainm@chromium.org, linux-kernel@vger.kernel.org Content-Transfer-Encoding: 7bit Message-Id: References: <20200515092704.902-1-hychao@google.com> To: Hsin-Yu Chao X-Mailer: Apple Mail (2.3608.80.23.2.2) Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Hsin-Yu, > Bluetooth PTS test case HFP/AG/ACC/BI-12-I accepts SCO connection > with invalid parameter at the first SCO request expecting AG to > attempt another SCO request with the use of "safe settings" for > given codec, base on section 5.7.1.2 of HFP 1.7 specification. > > This patch addresses it by adding "Invalid LMP Parameters" (0x1e) > to the SCO fallback case. Verified with below log: > > < HCI Command: Setup Synchronous Connection (0x01|0x0028) plen 17 > Handle: 256 > Transmit bandwidth: 8000 > Receive bandwidth: 8000 > Max latency: 13 > Setting: 0x0003 > Input Coding: Linear > Input Data Format: 1's complement > Input Sample Size: 8-bit > # of bits padding at MSB: 0 > Air Coding Format: Transparent Data > Retransmission effort: Optimize for link quality (0x02) > Packet type: 0x0380 > 3-EV3 may not be used > 2-EV5 may not be used > 3-EV5 may not be used >> HCI Event: Command Status (0x0f) plen 4 > Setup Synchronous Connection (0x01|0x0028) ncmd 1 > Status: Success (0x00) >> HCI Event: Number of Completed Packets (0x13) plen 5 > Num handles: 1 > Handle: 256 > Count: 1 >> HCI Event: Max Slots Change (0x1b) plen 3 > Handle: 256 > Max slots: 1 >> HCI Event: Synchronous Connect Complete (0x2c) plen 17 > Status: Invalid LMP Parameters / Invalid LL Parameters (0x1e) > Handle: 0 > Address: 00:1B:DC:F2:21:59 (OUI 00-1B-DC) > Link type: eSCO (0x02) > Transmission interval: 0x00 > Retransmission window: 0x02 > RX packet length: 0 > TX packet length: 0 > Air mode: Transparent (0x03) > < HCI Command: Setup Synchronous Connection (0x01|0x0028) plen 17 > Handle: 256 > Transmit bandwidth: 8000 > Receive bandwidth: 8000 > Max latency: 8 > Setting: 0x0003 > Input Coding: Linear > Input Data Format: 1's complement > Input Sample Size: 8-bit > # of bits padding at MSB: 0 > Air Coding Format: Transparent Data > Retransmission effort: Optimize for link quality (0x02) > Packet type: 0x03c8 > EV3 may be used > 2-EV3 may not be used > 3-EV3 may not be used > 2-EV5 may not be used > 3-EV5 may not be used >> HCI Event: Command Status (0x0f) plen 4 > Setup Synchronous Connection (0x01|0x0028) ncmd 1 > Status: Success (0x00) >> HCI Event: Max Slots Change (0x1b) plen 3 > Handle: 256 > Max slots: 5 >> HCI Event: Max Slots Change (0x1b) plen 3 > Handle: 256 > Max slots: 1 >> HCI Event: Synchronous Connect Complete (0x2c) plen 17 > Status: Success (0x00) > Handle: 257 > Address: 00:1B:DC:F2:21:59 (OUI 00-1B-DC) > Link type: eSCO (0x02) > Transmission interval: 0x06 > Retransmission window: 0x04 > RX packet length: 30 > TX packet length: 30 > Air mode: Transparent (0x03) > > Signed-off-by: Hsin-Yu Chao > --- > net/bluetooth/hci_event.c | 1 + > 1 file changed, 1 insertion(+) patch has been applied to bluetooth-next tree. Regards Marcel