Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp1019660imn; Tue, 26 Jul 2022 16:07:54 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uJ5/Y/Nx6FbFDVtlce3yymFADbZV6Uic10CVItMWnlaevTRIr7CvQMVRzNhAT6ckRv8LFQ X-Received: by 2002:a17:907:c0d:b0:72b:d0b0:2b55 with SMTP id ga13-20020a1709070c0d00b0072bd0b02b55mr15884333ejc.110.1658876874022; Tue, 26 Jul 2022 16:07:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658876874; cv=none; d=google.com; s=arc-20160816; b=qt+J7C6GI9BX2AZpfXgSpCaK3VEvNJ8VkGsFFLZgvyDsaOu9YSbHM5YveFBlkkBsKc /WeAVX/7mfkc4+9gcphMV6pf1I+26NL5tNT1EaundftnpypQ12M6itbxy8ywN+31RS/3 dTX1LhUaUuKFrO8b0o98z3lfxjKmtB4G4Jwm/kdRY1VdOd8EdSaqxb5gbl0ntCywD1XZ rhr6YHLeqyPEt6eMZIuwh6W2sY36tcdc6Bx10eBzz1OVBYji9BJenU4QRqzBgmsnd7S8 8Pa6RjFX2QGqn8+MUbGwWfcXQ7Llz455ciLgUwd+FfKUCZiS7Dpex9UBDSV7mSIANmve O5Vg== 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=r4lp5nt27/tB3qDocMwG82oen4cjzY/RCx9mwleUEPvM2SjrH2Dp/Z2py+USyG3HXL qPVs9s9qri94/g77T+Uz55M0yUKhGN52lnEeyOlux8/LdOdGmRVv1M+dVnJ79eRsBj5A mqgJS5V3MfUrECG4EjwZl/8SIcd776YqkotmlQnNoktbYPhptiBHSqOyZVjiLObRUIjT B6ER8tE4QmkyV3+IH8tBHXCDrlPh7kz3Dt1qNOosexjoThmIo9qccligBbmJGGXsQQhS YbUA/cfGAAJjfZtelXRQ2wh2k96NV5lPGhzheCH5VRRmeF2z2PkJJqL8dnEkS8pgB1Sn OQ4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=QTsIGhix; 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 ch11-20020a0564021bcb00b0043a6efbaaa4si15644023edb.301.2022.07.26.16.07.29; Tue, 26 Jul 2022 16:07:54 -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=QTsIGhix; 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 S230147AbiGZXBx (ORCPT + 99 others); Tue, 26 Jul 2022 19:01:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232345AbiGZXBw (ORCPT ); Tue, 26 Jul 2022 19:01:52 -0400 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 243C6E088 for ; Tue, 26 Jul 2022 16:01: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=1658876511; x=1690412511; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=LWVMLX40dH07f9AcuVgzOKAC3bgG/LUVNEKInKLHVhY=; b=QTsIGhixeOsJHl3cb0djKLpCld3Pa+9nNHFgPWmhEcVtYIyPzPqKDc3C p1IurUBW6PTXiZYzXiy8q1cnii6V2Rc8YbwnC/bM7hp9NDINkyn8FHMwB cFvrJtCzM5dT8U73GcdN/rKtta20lEnap1NPCW40y8BNdjd2tOylLvcK9 inzYQ0wWetZZkLXkq+mQ4TDjcqzQ9kkxeF0T+mmu0OFutrib4TliF8fxA g8AzlrDGF9nlWTVLM1+X+H3i4eRFzUfxgaa4mJKZSVU7/rW+BV7qbEv3D fwVsiGbVW8p9me7IVMOz2VGQqgOxktl6VAVuXEEikTgUm8qpf/Rbr9Bq7 w==; X-IronPort-AV: E=McAfee;i="6400,9594,10420"; a="289284697" X-IronPort-AV: E=Sophos;i="5.93,194,1654585200"; d="scan'208";a="289284697" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jul 2022 16:01:50 -0700 X-IronPort-AV: E=Sophos;i="5.93,194,1654585200"; d="scan'208";a="668098987" Received: from srezaei-mobl.amr.corp.intel.com (HELO bgi1-mobl2.amr.corp.intel.com) ([10.212.5.115]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jul 2022 16:01: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 v3 3/4] Bluetooth: Delete unused hci_req_stop_discovery() Date: Tue, 26 Jul 2022 16:01:39 -0700 Message-Id: <20220726230140.205481-4-brian.gix@intel.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220726230140.205481-1-brian.gix@intel.com> References: <20220726230140.205481-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_NONE,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