Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Bluetooth: hci_core, hci_sync: cleanup struct discovery_state

After commit 78db544b5d27 ("Bluetooth: hci_core: Remove le_restart_scan
work"), 'scan_start' and 'scan_duration' of 'struct discovery_state'
are still initialized but actually unused. So remove the aforementioned
fields and adjust 'hci_discovery_filter_clear()' and 'le_scan_disable()'
accordingly. Compile tested only.

Fixes: 78db544b5d27 ("Bluetooth: hci_core: Remove le_restart_scan work")
Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

authored by

Dmitry Antipov and committed by
Luiz Augusto von Dentz
da63f331 295ef07a

-6
-4
include/net/bluetooth/hci_core.h
··· 91 91 s8 rssi; 92 92 u16 uuid_count; 93 93 u8 (*uuids)[16]; 94 - unsigned long scan_start; 95 - unsigned long scan_duration; 96 94 unsigned long name_resolve_timeout; 97 95 }; 98 96 ··· 889 891 hdev->discovery.uuid_count = 0; 890 892 kfree(hdev->discovery.uuids); 891 893 hdev->discovery.uuids = NULL; 892 - hdev->discovery.scan_start = 0; 893 - hdev->discovery.scan_duration = 0; 894 894 } 895 895 896 896 bool hci_discovery_active(struct hci_dev *hdev);
-2
net/bluetooth/hci_sync.c
··· 371 371 goto _return; 372 372 } 373 373 374 - hdev->discovery.scan_start = 0; 375 - 376 374 /* If we were running LE only scan, change discovery state. If 377 375 * we were running both LE and BR/EDR inquiry simultaneously, 378 376 * and BR/EDR inquiry is already finished, stop discovery,