From patchwork Fri Jun 6 10:19:31 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kiran Kumar Raparthy X-Patchwork-Id: 31475 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ig0-f199.google.com (mail-ig0-f199.google.com [209.85.213.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 01282203C3 for ; Fri, 6 Jun 2014 10:19:58 +0000 (UTC) Received: by mail-ig0-f199.google.com with SMTP id c1sf2021560igq.6 for ; Fri, 06 Jun 2014 03:19:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=86yeVveHYiWV0Lo798292KkvKu3oijImbjgck8RZoSY=; b=JpiQU58sSlw2E+9YNMu+K/M3hu6KNspewQAzf1PyFsf27LJvt4kd+xxo1y7PfU47w0 PtSLzlbMHXh2oUPVIsWVKix1gyMuJW1AeQAiE8SROjerwEUtaMSKktr7kVmVAjAAx5Fe 67QYwRzwAKn2tI+B4SI5sxPL8SPnPpRAYIhGvkHRHj86amfwibJ8A2ku6YiH9MyhJvFP GwHATPMXP0Oq4iyAO/6+74WUnRf18wj4+3KvqQijfNer97ic/mJwKnsLsHuR9ogztmI9 yKVMG+JJ66VwLa3+wS+oaZTnAl/ixTYDK0estHGPkFrj8fhKFqCDgD1j7x3OlB2ca5qR SF5w== X-Gm-Message-State: ALoCoQm2yO8WGNFi09sb+x86B9ZJH7q+P1eNYiPNe/u+edKMy1py14FxLGje+uI+nwRLJT/Zw9Ha X-Received: by 10.182.80.40 with SMTP id o8mr1851151obx.35.1402049997634; Fri, 06 Jun 2014 03:19:57 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.49.130 with SMTP id q2ls703609qga.91.gmail; Fri, 06 Jun 2014 03:19:57 -0700 (PDT) X-Received: by 10.52.246.42 with SMTP id xt10mr3059513vdc.5.1402049997536; Fri, 06 Jun 2014 03:19:57 -0700 (PDT) Received: from mail-ve0-f177.google.com (mail-ve0-f177.google.com [209.85.128.177]) by mx.google.com with ESMTPS id rl9si5818743vec.18.2014.06.06.03.19.57 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 06 Jun 2014 03:19:57 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.177 as permitted sender) client-ip=209.85.128.177; Received: by mail-ve0-f177.google.com with SMTP id db11so2813877veb.36 for ; Fri, 06 Jun 2014 03:19:57 -0700 (PDT) X-Received: by 10.58.2.74 with SMTP id 10mr1763858ves.61.1402049997453; Fri, 06 Jun 2014 03:19:57 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.54.6 with SMTP id vs6csp86077vcb; Fri, 6 Jun 2014 03:19:57 -0700 (PDT) X-Received: by 10.60.73.97 with SMTP id k1mr5145751oev.54.1402049996928; Fri, 06 Jun 2014 03:19:56 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cs2si18550118pbc.242.2014.06.06.03.19.55; Fri, 06 Jun 2014 03:19:55 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752720AbaFFKTr (ORCPT + 27 others); Fri, 6 Jun 2014 06:19:47 -0400 Received: from mail-ie0-f182.google.com ([209.85.223.182]:35006 "EHLO mail-ie0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752212AbaFFKTp (ORCPT ); Fri, 6 Jun 2014 06:19:45 -0400 Received: by mail-ie0-f182.google.com with SMTP id x19so2239337ier.27 for ; Fri, 06 Jun 2014 03:19:45 -0700 (PDT) X-Received: by 10.50.67.79 with SMTP id l15mr4284435igt.10.1402049984920; Fri, 06 Jun 2014 03:19:44 -0700 (PDT) Received: from c-krapar-linux.ap.qualcomm.com ([202.46.23.54]) by mx.google.com with ESMTPSA id gr10sm33954589pbc.84.2014.06.06.03.19.40 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 06 Jun 2014 03:19:44 -0700 (PDT) From: Kiran Kumar Raparthy To: linux-kernel@vger.kernel.org Cc: Nick Pelly , Marcel Holtmann , Gustavo Padovan , Johan Hedberg , "David S. Miller" , Peter Hurley , Seung-Woo Kim , linux-bluetooth@vger.kernel.org, netdev@vger.kernel.org, Android Kernel Team , John Stultz , Kiran Raparthy Subject: [RFC] Bluetooth: Do not attempt to send dlci disconnect when in BT_CONFIG. Date: Fri, 6 Jun 2014 15:49:31 +0530 Message-Id: <1402049971-7762-1-git-send-email-kiran.kumar@linaro.org> X-Mailer: git-send-email 1.8.2.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: kiran.kumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.177 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Nick Pelly Do not attempt to send dlci disconnect when in BT_CONFIG. This fixes a bug where shutdown() and close() on a rfcomm socket during ACL connection would not cause HCI Create Connection Cancel. This is one of the number of patches from the Android AOSP common.git tree, which is used on almost all Android devices. so I wanted to submit it for review to see if it should go upstream. Cc: Marcel Holtmann Cc: Gustavo Padovan Cc: Johan Hedberg Cc: David S. Miller Cc: Peter Hurley Cc: Seung-Woo Kim Cc: Nick Pelly Cc: linux-bluetooth@vger.kernel.org Cc: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Android Kernel Team Cc: John Stultz Signed-off-by: Nick Pelly [kiran: Added context to commit message] Signed-off-by: Kiran Raparthy --- net/bluetooth/rfcomm/core.c | 1 - 1 file changed, 1 deletion(-) diff --git a/net/bluetooth/rfcomm/core.c b/net/bluetooth/rfcomm/core.c index cf62026..6a531e7 100644 --- a/net/bluetooth/rfcomm/core.c +++ b/net/bluetooth/rfcomm/core.c @@ -456,7 +456,6 @@ static int __rfcomm_dlc_close(struct rfcomm_dlc *d, int err) switch (d->state) { case BT_CONNECT: - case BT_CONFIG: case BT_OPEN: case BT_CONNECT2: if (test_and_clear_bit(RFCOMM_DEFER_SETUP, &d->flags)) {