Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2454534pxu; Fri, 18 Dec 2020 13:49:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJzSsMwxWtXad5ho3TOba0OLxj7grF9Gctt5JPuqA6wnuahh9YV/v2K23+p1nIV6RGIzTAm+ X-Received: by 2002:a17:906:d8a3:: with SMTP id qc3mr6002151ejb.443.1608328173937; Fri, 18 Dec 2020 13:49:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608328173; cv=none; d=google.com; s=arc-20160816; b=DgLVxcB9h/LkL1Bw5scl9YdvMLJQL4HN9dbHz87aXnbsdn7pyoP4N8FxJGhpm43jdv hQvVyLtXbvOpoSUkS1zKf/2dCvQooceKKY1Qh0IOtMwHEiqjjgjRv5Z/rIsz22u4g094 mz811XXwmy7Gglt81XfnE07lk1SRTY5Onq5vPPqb38RSfmuvitnGkDAk1/TfjzNupK9q g+iJ9fnqck1UFJGg/ALLxfoznMAmuoBKddAzmnJaehx+NOXqVCWDIN7+u7H1y6wXWHrm AnnHZvpyg0kV6kBxHanowDpr1vpAFKwTWXtEf82i5LZlhy+mWpMsiLer0UxLjAq+Gu7J 16rg== 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=HBxXzN/DID1yAkk//gCUpaPCQq7iDhqdd87GdZFMSIg=; b=IN0PlgMtQTH2fI0L5YtgCQe7HhT8450TV0CVsmGAqpj7bNEC+HBYa3phU7fl0uWnol Z5NEKcbEheZ9cdJPV0lyefIrhTIn7X/tKXBxon+o/V6ZE2n0g0+L+3h78Gt5x6LCYcij +WQZYL799bRiotOSktz/5JqJGO+29rUWeOE4zHCMzTCa4Ggrdsc5NyUMO6lqIJgUCnTD S6H269kligGCHkRjm8BCKgKMtYbBmWTUTyG4qhHKumV1pYvnhtnaz2qk2WwfLa6YCYKp 9YFwxqdZg13UxlfNZWlaOoDyuqqj6vRdw21DFmOlhmFXsMwDj+qcjwGBXZy74oda+Y/2 y7iQ== 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 hr1si5542587ejc.474.2020.12.18.13.49.11; Fri, 18 Dec 2020 13:49:33 -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 S1725969AbgLRVsJ (ORCPT + 99 others); Fri, 18 Dec 2020 16:48:09 -0500 Received: from coyote.holtmann.net ([212.227.132.17]:46609 "EHLO mail.holtmann.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725884AbgLRVsJ (ORCPT ); Fri, 18 Dec 2020 16:48:09 -0500 Received: from marcel-macbook.holtmann.net (p4fefcdf9.dip0.t-ipconnect.de [79.239.205.249]) by mail.holtmann.org (Postfix) with ESMTPSA id 297FCCED31; Fri, 18 Dec 2020 22:54:44 +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 v2] Bluetooth: Cancel Inquiry before Create Connection From: Marcel Holtmann In-Reply-To: <20201209213514.99326-1-sonnysasaka@chromium.org> Date: Fri, 18 Dec 2020 22:47:26 +0100 Cc: linux-bluetooth@vger.kernel.org, Abhishek Pandit-Subedi , Alain Michaud Content-Transfer-Encoding: 7bit Message-Id: References: <20201209213514.99326-1-sonnysasaka@chromium.org> To: Sonny Sasaka X-Mailer: Apple Mail (2.3654.40.0.2.32) Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Sonny, > Many controllers do not allow HCI Create Connection while it is doing > Inquiry. This patch adds Inquiry Cancel before Create Connection in this > case to allow the controller to do Create Connection. User space will be > aware of this Inquiry cancellation and they may issue another discovery > request afterwards. > > Sample Command Disallowed response of HCI Create Connection: > < HCI Command: Inquiry (0x01|0x0001) plen 5 > Access code: 0x9e8b33 (General Inquiry) > Length: 10.24s (0x08) > Num responses: 0 >> HCI Event: Command Status (0x0f) plen 4 > Inquiry (0x01|0x0001) ncmd 2 > Status: Success (0x00) > < HCI Command: Create Connection (0x01|0x0005) plen 13 > Address: XX:XX:XX:XX:XX:XX > Packet type: 0xcc18 > Page scan repetition mode: R2 (0x02) > Page scan mode: Mandatory (0x00) > Clock offset: 0x0000 > Role switch: Allow slave (0x01) >> HCI Event: Command Status (0x0f) plen 4 > Create Connection (0x01|0x0005) ncmd 1 > Status: Success (0x00) >> HCI Event: Connect Complete (0x03) plen 11 > Status: Command Disallowed (0x0c) > Handle: 65535 > Address: XX:XX:XX:XX:XX:XX > Link type: ACL (0x01) > Encryption: Disabled (0x00) > > Reviewed-by: Abhishek Pandit-Subedi > Reviewed-by: Alain Michaud > Signed-off-by: Sonny Sasaka > > --- > net/bluetooth/hci_conn.c | 17 +++++++++++++++++ > 1 file changed, 17 insertions(+) patch has been applied to bluetooth-next tree. Regards Marcel