diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2020-04-09 08:05:48 +0200 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2020-04-15 16:51:02 +0300 |
commit | 849c9c35e80d73c215c65b6023658b371bdeb5ed (patch) | |
tree | 4afe840bd777892ff5a40979405d9c42548d02ab /net/bluetooth | |
parent | 55beec10710d10cb4a1cbbc5b1a0d9c9cfbd2c1e (diff) | |
download | lwn-849c9c35e80d73c215c65b6023658b371bdeb5ed.tar.gz lwn-849c9c35e80d73c215c65b6023658b371bdeb5ed.zip |
Bluetooth: Use extra variable to make code more readable
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 <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'net/bluetooth')
-rw-r--r-- | net/bluetooth/hci_request.c | 4 |
1 files changed, 3 insertions, 1 deletions
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; } |