Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp606468imn; Fri, 29 Jul 2022 17:51:57 -0700 (PDT) X-Google-Smtp-Source: AA6agR7TWunTUpc1vipNbEcQ0uuDsuTec5hA6df23JUaIO/HthpVfe1SCF9uKueYquZBEh+tLbN+ X-Received: by 2002:a17:902:b20b:b0:16c:f2f6:ef93 with SMTP id t11-20020a170902b20b00b0016cf2f6ef93mr6453354plr.44.1659142317252; Fri, 29 Jul 2022 17:51:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659142317; cv=none; d=google.com; s=arc-20160816; b=JWAEscevEdLcGc1OZWvvamKcL1p1eDbC8DHTjan2uap1oRBiYemFCERXmr3ZEC09cP P0M4P/EhxV40qYB6OeKfvEU7Q05FFLGOGcgWwDdkKGuwRN+4qrfxKskVyxPuVs6XL5mf D8L0COAjwB+oxEMdjKK9a5zOvYK2RtbE8l9bX+bF7f0Ti2DKs4nY8HTZptvd1+8f1J/t GxGFWZgSoVGXcPNwNs07uNqiLd5bTFe4qVmxq2At5r9t/EP0mW9muKOzQFogQv33mcMA nG94kHwcAZYD71i1aH0YxfPInaeL20d8Idbk3JxEjNp/r76jx1wdigztkylRbnvlqQcc O7Rg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=sk7qfOCFIxhms/EnXHKsmiNQu8kl9yzqagwjCNP97jk=; b=JTCw8qj7MJISVjpydFoMAmXB7RJe3iiU/a8I1Bovh9hywVJb8Ovq/P5hGn96vZC9+p BRQyn6h4SGoD1YkP9g+nVLqztHXb0lkjQU3dqVqQYrw4cZ2o82GesxhidZqo8DsKaFgE mgfW6jD0BVHauCEn1E3AIKROX1UH3S6rRXGmXtIuCNFF9qsCOyHiGrYC4phi6DCcIRPf dYccvEoOTSDD0bHfdedir5rAu/RNsTLHCQPsjvtX8iREXhOhyMnUCcO5LIQ0eBoPIXWC 53W/NBMdRL+9XtS8OO+e76mAgYvvUbVcEPx1hoiQvDZ79lhOf1fQCznjwbJsSPB2/+eH rXoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=d3uTdhNN; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j63-20020a638b42000000b0041b79cac307si620928pge.111.2022.07.29.17.51.43; Fri, 29 Jul 2022 17:51:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=d3uTdhNN; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239098AbiG3Auy (ORCPT + 99 others); Fri, 29 Jul 2022 20:50:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239413AbiG3Auw (ORCPT ); Fri, 29 Jul 2022 20:50:52 -0400 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B603173920 for ; Fri, 29 Jul 2022 17:50:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1659142251; x=1690678251; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=LWVMLX40dH07f9AcuVgzOKAC3bgG/LUVNEKInKLHVhY=; b=d3uTdhNNLuwnn96eDIYPyVv2/R2TYTO8Ba5jttmEJbDwoMrXHR8Qi8Bb /jpcygbcILnmc0UlYDN5CX+3qlEqFCVYJ3aDq1+OlTT8Z6u3BiEDWuIyB 95oYgYVqoU3HsJGIM9qaBfh9nuva+RVFZvcTRHUw75ntS2nnDNCuKTUWx QDHQhRZdQ2e0aJsgMbdO3w8glDWs/Zl4JiMd2xhyxQl1LwTWYo/RdgV25 zkrEhX6a3HBAmx/ZdbktyTMbQLE7nsg84vsuxke97r1Yyz/y2s4e3cEL0 XcC+lA8chL+iWSoReQwKtHcOdUiDHCG//VNioQwiF4wlEb+tseiHeOMUP w==; X-IronPort-AV: E=McAfee;i="6400,9594,10423"; a="268644789" X-IronPort-AV: E=Sophos;i="5.93,202,1654585200"; d="scan'208";a="268644789" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jul 2022 17:50:49 -0700 X-IronPort-AV: E=Sophos;i="5.93,202,1654585200"; d="scan'208";a="660458107" Received: from agcodina-mobl1.amr.corp.intel.com (HELO bgi1-mobl2.amr.corp.intel.com) ([10.212.26.50]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jul 2022 17:50:49 -0700 From: Brian Gix To: linux-bluetooth@vger.kernel.org Cc: marcel@holtmann.org, luiz.dentz@gmail.com, brian.gix@intel.com Subject: [PATCH v5 03/10] Bluetooth: Delete unused hci_req_stop_discovery() Date: Fri, 29 Jul 2022 17:50:31 -0700 Message-Id: <20220730005038.894650-4-brian.gix@intel.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220730005038.894650-1-brian.gix@intel.com> References: <20220730005038.894650-1-brian.gix@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org hci_req_stop_discovery has been deprecated in favor of hci_stop_discovery_sync() as part of transition to hci_sync.c Signed-off-by: Brian Gix --- net/bluetooth/hci_request.c | 48 ------------------------------------- net/bluetooth/hci_request.h | 2 -- 2 files changed, 50 deletions(-) diff --git a/net/bluetooth/hci_request.c b/net/bluetooth/hci_request.c index 114af7350363..ef0a5ec067b6 100644 --- a/net/bluetooth/hci_request.c +++ b/net/bluetooth/hci_request.c @@ -1975,54 +1975,6 @@ int hci_abort_conn(struct hci_conn *conn, u8 reason) return 0; } -bool hci_req_stop_discovery(struct hci_request *req) -{ - struct hci_dev *hdev = req->hdev; - struct discovery_state *d = &hdev->discovery; - struct hci_cp_remote_name_req_cancel cp; - struct inquiry_entry *e; - bool ret = false; - - bt_dev_dbg(hdev, "state %u", hdev->discovery.state); - - if (d->state == DISCOVERY_FINDING || d->state == DISCOVERY_STOPPING) { - if (test_bit(HCI_INQUIRY, &hdev->flags)) - hci_req_add(req, HCI_OP_INQUIRY_CANCEL, 0, NULL); - - if (hci_dev_test_flag(hdev, HCI_LE_SCAN)) { - cancel_delayed_work(&hdev->le_scan_disable); - cancel_delayed_work(&hdev->le_scan_restart); - hci_req_add_le_scan_disable(req, false); - } - - ret = true; - } else { - /* Passive scanning */ - if (hci_dev_test_flag(hdev, HCI_LE_SCAN)) { - hci_req_add_le_scan_disable(req, false); - ret = true; - } - } - - /* No further actions needed for LE-only discovery */ - if (d->type == DISCOV_TYPE_LE) - return ret; - - if (d->state == DISCOVERY_RESOLVING || d->state == DISCOVERY_STOPPING) { - e = hci_inquiry_cache_lookup_resolve(hdev, BDADDR_ANY, - NAME_PENDING); - if (!e) - return ret; - - bacpy(&cp.bdaddr, &e->data.bdaddr); - hci_req_add(req, HCI_OP_REMOTE_NAME_REQ_CANCEL, sizeof(cp), - &cp); - ret = true; - } - - return ret; -} - static void config_data_path_complete(struct hci_dev *hdev, u8 status, u16 opcode) { diff --git a/net/bluetooth/hci_request.h b/net/bluetooth/hci_request.h index 39d001fa3acf..faf6d9a51a91 100644 --- a/net/bluetooth/hci_request.h +++ b/net/bluetooth/hci_request.h @@ -113,8 +113,6 @@ int hci_get_random_address(struct hci_dev *hdev, bool require_privacy, void __hci_req_update_class(struct hci_request *req); /* Returns true if HCI commands were queued */ -bool hci_req_stop_discovery(struct hci_request *req); - int hci_req_configure_datapath(struct hci_dev *hdev, struct bt_codec *codec); void __hci_req_update_scan(struct hci_request *req); -- 2.37.1