Received: by 2002:a05:6358:e9c4:b0:b2:91dc:71ab with SMTP id hc4csp2246782rwb; Fri, 5 Aug 2022 16:43:29 -0700 (PDT) X-Google-Smtp-Source: AA6agR6kLWqSRYQN3WBvuhDDiUWWUnwomQTkaLpC27hYfzKDg9Fc44zdQWLRkvLU9X5JdDwxokHW X-Received: by 2002:a63:164d:0:b0:416:4bc:1c28 with SMTP id 13-20020a63164d000000b0041604bc1c28mr7413986pgw.302.1659743009516; Fri, 05 Aug 2022 16:43:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659743009; cv=none; d=google.com; s=arc-20160816; b=l/cvGLnEXF3HCkT0oV9pe2a6r7W9p98etqTtC9hmcm9j/I/9Zv8JyEB2QU0SB+NR35 4e/ZYiCQ5Ou4WerrknZCyyIU3n5wdgYJki2guvvljsehZEXKPmW4Wrwu19vJ9h+ehgij t1GPc/EVi1EAf5ezB+qFZBX0bzSfI1TJeZ/m7JGGKBsqmce9uIOn45Me9tq2RsW43RqV S4ZCnla5/+We2IrZuhp9oINF3XT5GpRvrAftAHsKqXdiDQUbAqTwwF5wSOfm5TROggAT FWV10ggQ6qqD1+kesLauATuHEaErBPqbhqh1bk7iepWGqeiEUBcS1nVylAEPvV35Wr4K EYHQ== 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=t5ODV85zSJDbhIIbMT+oWvgQOyDcvamiFR5sa9NbA/RQrkuf6/+flBCB4KXHnwCuLE KkfgjiVk/lMb2WuayW8FT8jNnCBEtq0Z7q9EJh1YlxgQvtxQdoQK7kRFXiHKvd/Q3rxY KB3laiNwBrD0xnpqzm4VK5p48TZyrL2L9DQQn/JKQb7LmzPj7y3gpH8QOynhQF0BIQND p7d9SKvpcXwDT2ZeTIwhMGLVJpGkc0mv9YVgKemEb1HzSBEI8/Y5V6QWQNNeyBVzy5uB g4lis+UwWh79rAMamXy5VPx12kKBbHOU33Q8lvMuC2n/05VoC915/CADXacnVLY2zm6A DP/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=iVcgW3uj; 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 v9-20020a63b649000000b0041ae144858dsi4227816pgt.323.2022.08.05.16.43.15; Fri, 05 Aug 2022 16:43:29 -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=iVcgW3uj; 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 S240876AbiHEXmx (ORCPT + 99 others); Fri, 5 Aug 2022 19:42:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55404 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241637AbiHEXmu (ORCPT ); Fri, 5 Aug 2022 19:42:50 -0400 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B030C7A52D for ; Fri, 5 Aug 2022 16:42:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1659742969; x=1691278969; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=LWVMLX40dH07f9AcuVgzOKAC3bgG/LUVNEKInKLHVhY=; b=iVcgW3ujfybnF4+OyuKdGy2QC0FDRN4qmvUDIGKj+2QT/4Qqoti751y4 Gz+MWb8s+OxAu7eAD9O7ikaR6lvZ4B8OdIpUdmuAOflgA+NamRFsVFZdw io5SL3PXluZ27ipZAQbs5x3B5oEvpc/54SVz86KhMaoVngNgkt2p6583l 53l/7SFFoFM/uJf8R9qqT1Dn8nOPYtvdkqykvKF794z0oEbpKWGka08I9 7mTfXEwW/Y6su1ZNCEjHuU8vttfDmfSITPgSbRjXrDio1U+JBW/MOTmdp vqbWdWsih65ftRclwqLgJzhQT0T3Malko19PoTOLV4OjSZKw+HUl7XLmS w==; X-IronPort-AV: E=McAfee;i="6400,9594,10430"; a="273362749" X-IronPort-AV: E=Sophos;i="5.93,217,1654585200"; d="scan'208";a="273362749" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Aug 2022 16:42:48 -0700 X-IronPort-AV: E=Sophos;i="5.93,217,1654585200"; d="scan'208";a="636661812" Received: from bkkx-mobl.gar.corp.intel.com (HELO bgi1-mobl2.amr.corp.intel.com) ([10.209.189.232]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Aug 2022 16:42:48 -0700 From: Brian Gix To: linux-bluetooth@vger.kernel.org Cc: marcel@holtmann.org, luiz.dentz@gmail.com, brian.gix@intel.com Subject: [PATCH v7 3/9] Bluetooth: Delete unused hci_req_stop_discovery() Date: Fri, 5 Aug 2022 16:42:30 -0700 Message-Id: <20220805234236.704986-4-brian.gix@intel.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220805234236.704986-1-brian.gix@intel.com> References: <20220805234236.704986-1-brian.gix@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE 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