Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp383376ybt; Wed, 17 Jun 2020 03:34:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzCRJo40y+elKSB//8/4Had2FIt/1IAg1YFtuDc/fBGdsm3wLyYYpAt6Tps8Yn36XpvTMVn X-Received: by 2002:a05:6402:221b:: with SMTP id cq27mr6458328edb.302.1592390099355; Wed, 17 Jun 2020 03:34:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592390099; cv=none; d=google.com; s=arc-20160816; b=MwPVUUTeqpDyO4hWKj/zuJjQAwWq7MFqGQ2vJVA8bbnrZmDK39FFEdP9cGEJPa8Ro7 g+OjPgOG9Qso5atyNAzQL1fJoRZs6mp+bhGdREB9qnE5qOFOsoQIZ4d45vilN7b9yo8S h7qgr1HWq7gzoAkEtHnG2+XrQVBWplsOudy/8htZWv8kTaPG5VOItwpAkd9dYdK2cGE3 LyiUpDgZD41i7IE19hsXc8dZoAPgmuyW1iLCspDr9NwnUnOmXg65EsdodyNapOxzAEx9 3LGJJVkOLWS5F5SAr5o/R9PI+ORgcxyi4GHbbWy2Zh3WJTGWexQB6w0cJcEHxNF0s8jL lWfw== 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=6n9aclSafhzee2KwhFzmRO36pZW+FmJ+KqmxXq5qmNg=; b=FR9AKrZE6bNrMr28b2s2zjJcipZlkYYDn9HZ8qJ7LoHfXY1OTe4LIbf2cAq8Jfgalo mg/m+erbiI9QmxVe3xaSRT4Njq3M64paQUAYoutwdFwwUWHPVbGYMmTcXX7O2s8RUY8n TkwpaojaQyKyScidOKa4YY0kExt1OLgkPeBtBT3hsgqU23jo+dLl5iXKJl0E3BXQwjbt eV9ev0ArGeccCqf3PkmxwD292f/afE4wRf5D4bu6B71nJ28sH3LhQkXzbT6r+4E5SQyA k6L2MEQLld4FCsfLEa1Wq17ILvwosS2rI2Jr27NOscjAxP3fpNi+YezJf0oEaH2e+5fw X8Jw== 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 ay24si13020017edb.310.2020.06.17.03.34.34; Wed, 17 Jun 2020 03:34:59 -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 S1726270AbgFQKdu convert rfc822-to-8bit (ORCPT + 99 others); Wed, 17 Jun 2020 06:33:50 -0400 Received: from coyote.holtmann.net ([212.227.132.17]:60498 "EHLO mail.holtmann.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725554AbgFQKdt (ORCPT ); Wed, 17 Jun 2020 06:33:49 -0400 Received: from marcel-macbook.fritz.box (p5b3d2638.dip0.t-ipconnect.de [91.61.38.56]) by mail.holtmann.org (Postfix) with ESMTPSA id 66051CECD1; Wed, 17 Jun 2020 12:43:39 +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 v2] Bluetooth: Terminate the link if pairing is cancelled From: Marcel Holtmann In-Reply-To: <20200616092341.v2.1.I9dd050ead919f2cc3ef83d4e866de537c7799cf3@changeid> Date: Wed, 17 Jun 2020 12:33:47 +0200 Cc: Luiz Augusto von Dentz , Bluetooth Kernel Mailing List , ChromeOS Bluetooth Upstreaming , Alain Michaud , "David S. Miller" , Johan Hedberg , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8BIT Message-Id: <4F76321E-918F-4A16-B35A-888733D5B75D@holtmann.org> References: <20200616092341.v2.1.I9dd050ead919f2cc3ef83d4e866de537c7799cf3@changeid> To: Manish Mandlik 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 Manish, > If user decides to cancel the ongoing pairing process (e.g. by clicking > the cancel button on pairing/passkey window), abort any ongoing pairing > and then terminate the link if it was created because of the pair > device action. > > Signed-off-by: Manish Mandlik > --- > > Changes in v2: > - Added code to track if the connection was triggered because of the pair > device action and then only terminate the link on pairing cancel. > > include/net/bluetooth/hci_core.h | 14 ++++++++++++-- > net/bluetooth/hci_conn.c | 11 ++++++++--- > net/bluetooth/l2cap_core.c | 6 ++++-- > net/bluetooth/mgmt.c | 22 ++++++++++++++++++---- > 4 files changed, 42 insertions(+), 11 deletions(-) patch has been added to my local tree. I will send an update with all pending patches in a bit. Regards Marcel