Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1328478ybb; Wed, 8 Apr 2020 23:06:29 -0700 (PDT) X-Google-Smtp-Source: APiQypJnSkrAPHV6wqYNl8w3HuVoz5aSI1i2vzNH1k99S1s5JVBEuDAq7Ls9MGuQnC+U2AWN0/Xa X-Received: by 2002:a05:6830:1b68:: with SMTP id d8mr1562304ote.183.1586412388841; Wed, 08 Apr 2020 23:06:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586412388; cv=none; d=google.com; s=arc-20160816; b=EAZU0NAXP8jgKEOKF0Ah+pdNFmZrd7B5hWlg6qsy1FwU1He4Pcbur6HpeoDVPzYFZl HeMDGXRJbfJXWf6WvbXfSbdRteiGK7lB/appU7hZS2gR5kjcLxkSAhoNLq4TAB5T5oui ZjKnLLsUTn0tTt8LyCto+y/IMKUYLo2I4Qu12PQONr6KGjgoBfGTSj56iTcA74r1hyqp KgqdNmTtrEk+ejGHMbsA3Dl/eXHixzUOKrfA2jTlDYxatinnue8IRv3ocB64rn+ZNTlv z00LqLv3GYQoX6z/NgHqaoINrAZetYpjy+NKnigKShDMaK0Ggm9oRhLYBL81//aHZhux 74NQ== 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 :references:in-reply-to:message-id:date:subject:to:from; bh=cC+LsWzmypsywb0jhwyUCmpUdgkFQCYj/LnwFOxC3/0=; b=XpbLaTBjPr6JG4biseLINpj1rpKcfK8elTyeSgHZ800w6Nr9E1skTWvnMtpAdLOBUl vDilN5aDVheG/+UgQmGzLDNlJa9cPaaMTcB00rQLNQoYC0GNSOMqBppaqKVb82shuzJ0 +UF8kSlwypOarkZ1HccruiyFqHnJY8SMon3SmGMEZmslTcrxA0Y8bCw+TVPqCgz/hdyI HXV1iD9qqru9OFNlJfbyOxNEWGkQF9wWVl8j/7/i1041m2e2bD886oJfiMhGMtCa/b3c YEJdLYNv5PcH4d93LyUFPuVmsFiYbDQW++3JCqbA/WkbTJYD9wlPCwsT4LBdDPq5d5LV VdUw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z65si3521888otb.197.2020.04.08.23.06.06; Wed, 08 Apr 2020 23:06:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726534AbgDIGFz (ORCPT + 99 others); Thu, 9 Apr 2020 02:05:55 -0400 Received: from coyote.holtmann.net ([212.227.132.17]:49599 "EHLO mail.holtmann.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726082AbgDIGFz (ORCPT ); Thu, 9 Apr 2020 02:05:55 -0400 Received: from localhost.localdomain (p4FEFC5A7.dip0.t-ipconnect.de [79.239.197.167]) by mail.holtmann.org (Postfix) with ESMTPSA id B8225CECF4 for ; Thu, 9 Apr 2020 08:15:29 +0200 (CEST) From: Marcel Holtmann To: linux-bluetooth@vger.kernel.org Subject: [PATCH 2/4] Bluetooth: Use extra variable to make code more readable Date: Thu, 9 Apr 2020 08:05:48 +0200 Message-Id: X-Mailer: git-send-email 2.25.2 In-Reply-To: References: 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 When starting active scanning for discovery the whitelist is not needed to be used. So the filter_policy is 0x00. To make the core more readable use a variable name instead of just setting 0 as paramter. Signed-off-by: Marcel Holtmann --- net/bluetooth/hci_request.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/net/bluetooth/hci_request.c b/net/bluetooth/hci_request.c index 649e1e5ed446..9ea40106ef17 100644 --- a/net/bluetooth/hci_request.c +++ b/net/bluetooth/hci_request.c @@ -2723,6 +2723,8 @@ static int active_scan(struct hci_request *req, unsigned long opt) uint16_t interval = opt; struct hci_dev *hdev = req->hdev; u8 own_addr_type; + /* White list is not used for discovery */ + u8 filter_policy = 0x00; int err; BT_DBG("%s", hdev->name); @@ -2744,7 +2746,7 @@ static int active_scan(struct hci_request *req, unsigned long opt) own_addr_type = ADDR_LE_DEV_PUBLIC; hci_req_start_scan(req, LE_SCAN_ACTIVE, interval, DISCOV_LE_SCAN_WIN, - own_addr_type, 0); + own_addr_type, filter_policy); return 0; } -- 2.25.2