mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-27 00:51:35 +00:00
Bluetooth: Sort to-be-resolved devices by RSSI during discovery
This patch makes sure that devices with stronger signal (RSSI closer to 0) are sorted first in the resolve list and will therefore get their names resolved first during device discovery. Since it's more likely that the device the user is trying to discover has a strong signal due to its proximity this ensures that the user gets the "device found" event for it more quickly. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Acked-by: Marcel Holtmann <marcel@holtmann.org>
This commit is contained in:
parent
44b5f7d0cb
commit
a3d4e20a88
3 changed files with 30 additions and 2 deletions
|
@ -2043,7 +2043,7 @@ static int confirm_name(struct sock *sk, u16 index, unsigned char *data,
|
|||
list_del(&e->list);
|
||||
} else {
|
||||
e->name_state = NAME_NEEDED;
|
||||
list_move(&e->list, &hdev->discovery.resolve);
|
||||
hci_inquiry_cache_update_resolve(hdev, e);
|
||||
}
|
||||
|
||||
err = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue