Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1635282ybt; Mon, 15 Jun 2020 05:44:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwoQANKdYicqXOl3CPrUL7PwIowT++6DIdmNulw93IvFNkWaHlapQPsxl5N1ZAHlUP6xRzP X-Received: by 2002:a17:906:2409:: with SMTP id z9mr24679374eja.442.1592225063533; Mon, 15 Jun 2020 05:44:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592225063; cv=none; d=google.com; s=arc-20160816; b=mTjL6sW9Pe3waeFS7AJ+qht3v3hYz7MN5CfVwvFXyt8773K8lbIyqCeHKNy6HJyXK2 83A0KXXzBFtJgKVFmOUJssbq65ZqrktTO7Ke28aYRf11EjiOfQavPFvEhDE/j835H7fZ QCzzAEM8sqCjKuZbPvR5Z6HtrrkPFy5LWKjOcm4vDxk3JwZS9ttBygE2SZCrERXi+RE5 AddP2sm2vCGM27Ro5RN+Vr9lxTrlEFNzDPTBb0EtFW7mjN1Sc6CeXB0UK5ecwnXrTqwp sS+LABUcWn461i5zTVo4vIgWOavpSt7C6fguHtCz3SDipi4Srr5NEgQAKU9zLDNucO45 C9aA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=P8Vj9oQ74zsd0LOGWPldE12+eK1pcedzb9RIuNUDypY=; b=lOsuiMqRLHscpCHMNZCt0ECLdDedPYzbY274nlegRo8H7ART0+4Euy786QZnoLH68t /eSBV3JuUnfa2tgxtokL2Q8OZaaT/+JQSh132gcL+nUiMp2mtU3yEKVixfhsVnBOOHV/ CLIE0YNIqIw1EnbJ8slRpfHRY/oAZwtA+Vji//+KceqoHctr23QH3YsJK8gNQaV7GzwM q7spqKWup4nQkkzeSwRbhSCyqZAB0PKV33fPHSyfqKQn+c6QYGOYPXgNhXCKcd9od7A7 5xAG3/c5H5o9x5vMI1JhKat0s3o4+Q4hD/hqq117kD7GRnQBSIuXwF9zFyKxEUqGpuU8 c6Fw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=GDhRe+QZ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s15si8859701ejq.486.2020.06.15.05.43.59; Mon, 15 Jun 2020 05:44:23 -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; dkim=pass header.i=@chromium.org header.s=google header.b=GDhRe+QZ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729819AbgFOMnz (ORCPT + 99 others); Mon, 15 Jun 2020 08:43:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49642 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729642AbgFOMny (ORCPT ); Mon, 15 Jun 2020 08:43:54 -0400 Received: from mail-vk1-xa43.google.com (mail-vk1-xa43.google.com [IPv6:2607:f8b0:4864:20::a43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 77769C061A0E for ; Mon, 15 Jun 2020 05:43:53 -0700 (PDT) Received: by mail-vk1-xa43.google.com with SMTP id t23so3897823vkt.5 for ; Mon, 15 Jun 2020 05:43:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=P8Vj9oQ74zsd0LOGWPldE12+eK1pcedzb9RIuNUDypY=; b=GDhRe+QZIWD/hhDaZoRUjNH3K91ct278ipLPCnGPXpgV54kQqCIvVYH3Y+w5AtIIOc TTIwIgoMrkKJ3uBTXN1HY8i6aKHtZPQJF+APUR6AWAyyMUxBCSwzrejFbIHuUi+URwyX Orbr6lSnIj77212YL7nDr1JETKz52IrK790FI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=P8Vj9oQ74zsd0LOGWPldE12+eK1pcedzb9RIuNUDypY=; b=BWmJwZzJnfyRMt6LkxcJDyApmAqFfcmv9g5g6eooBovmAc1ILylneho8jKjB884u6r xFj3Q6KFx/xJO8BFsMdLDr4zReGUBNFDNDNOu1IqQ9Im5dRXK6MRv1P+DSYDh4M2uAJe NAOVmbc8f9pI1+WpC5OgzQ0fXE8V70t3AqWq9dArLPxjojgZ45fUKS9wecoURgEPq3ey JlBXvOHskKPKl6CrYuGUlIPWrgOTqcGjrsj3mJ+6rE5XlS9kI/bVSG1AAre12aIo4bf7 GFZA7MKGWHldHwq4bvvO7lrrXed/VKpUq8m8+PJl964wghyCZ8hddbJRiZmmEU5JO1O2 BEbg== X-Gm-Message-State: AOAM530DORKI5FXFwlWH/8c9Dz1orY/TIKNivUHy2+ZjFilEGhIbJyzk FPaWPnaxO1Mto8VJkvvf62tmUWe7jc8= X-Received: by 2002:a1f:430a:: with SMTP id q10mr17769661vka.4.1592225031333; Mon, 15 Jun 2020 05:43:51 -0700 (PDT) Received: from alain.c.googlers.com.com (252.177.243.35.bc.googleusercontent.com. [35.243.177.252]) by smtp.gmail.com with ESMTPSA id 81sm1798381uaj.5.2020.06.15.05.43.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jun 2020 05:43:50 -0700 (PDT) From: Alain Michaud To: linux-bluetooth@vger.kernel.org Cc: Alain Michaud Subject: [PATCH v1] bluetooth: use configured default params for active scans Date: Mon, 15 Jun 2020 12:43:44 +0000 Message-Id: <20200615124344.37192-1-alainm@chromium.org> X-Mailer: git-send-email 2.27.0.290.gba653c62da-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org This patch fixes active scans to use the configured default parameters. Signed-off-by: Alain Michaud --- net/bluetooth/hci_request.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/net/bluetooth/hci_request.c b/net/bluetooth/hci_request.c index a7f572ad38ef..04f846958ad6 100644 --- a/net/bluetooth/hci_request.c +++ b/net/bluetooth/hci_request.c @@ -2742,8 +2742,9 @@ static int active_scan(struct hci_request *req, unsigned long opt) if (err < 0) own_addr_type = ADDR_LE_DEV_PUBLIC; - hci_req_start_scan(req, LE_SCAN_ACTIVE, interval, DISCOV_LE_SCAN_WIN, - own_addr_type, filter_policy); + hci_req_start_scan(req, LE_SCAN_ACTIVE, interval, + hdev->le_scan_window_discovery, own_addr_type, + filter_policy); return 0; } @@ -2790,18 +2791,18 @@ static void start_discovery(struct hci_dev *hdev, u8 *status) * to do BR/EDR inquiry. */ hci_req_sync(hdev, interleaved_discov, - DISCOV_LE_SCAN_INT * 2, HCI_CMD_TIMEOUT, + hdev->le_scan_int_discovery * 2, HCI_CMD_TIMEOUT, status); break; } timeout = msecs_to_jiffies(hdev->discov_interleaved_timeout); - hci_req_sync(hdev, active_scan, DISCOV_LE_SCAN_INT, + hci_req_sync(hdev, active_scan, hdev->le_scan_int_discovery, HCI_CMD_TIMEOUT, status); break; case DISCOV_TYPE_LE: timeout = msecs_to_jiffies(DISCOV_LE_TIMEOUT); - hci_req_sync(hdev, active_scan, DISCOV_LE_SCAN_INT, + hci_req_sync(hdev, active_scan, hdev->le_scan_int_discovery, HCI_CMD_TIMEOUT, status); break; default: -- 2.27.0.290.gba653c62da-goog