History

Bluetooth: Limit duration of Remote Name Resolve

When doing remote name request, we cannot scan. In the normal case it's OK since we can expect it to finish within a short amount of time. However, there is a possibility to scan lots of devices that (1) requires Remote Name Resolve (2) is unresponsive to Remote Name Resolve When this happens, we are stuck to do Remote Name Resolve until all is done before continue scanning. This patch adds a time limit to stop us spending too long on remote name request.

Archie Pusaka committed 4 years ago

Commit dbf68111 parent ea13aed2 files · +10 −0Browse files

Showing the changes to include (1 of 2 files). Show all

Unified · Split

include/net/bluetooth/hci_core.h+3−0
@@ -88,6 +88,7 @@ struct discovery_state { · 87 unmodified lines
88 u8 (*uuids)[16];88 u8 (*uuids)[16];
89 unsigned long scan_start;89 unsigned long scan_start;
90 unsigned long scan_duration;90 unsigned long scan_duration;
91 unsigned long name_resolve_timeout;
91};92};
92 93
93#define SUSPEND_NOTIFIER_TIMEOUT msecs_to_jiffies(2000) /* 2 seconds */94#define SUSPEND_NOTIFIER_TIMEOUT msecs_to_jiffies(2000) /* 2 seconds */
@@ -1759,6 +1760,8 @@ void hci_mgmt_chan_unregister(struct hci_mgmt_chan *c); · 1665 unmodified lines
1759#define DISCOV_LE_FAST_ADV_INT_MIN 0x00A0 /* 100 msec */1760#define DISCOV_LE_FAST_ADV_INT_MIN 0x00A0 /* 100 msec */
1760#define DISCOV_LE_FAST_ADV_INT_MAX 0x00F0 /* 150 msec */1761#define DISCOV_LE_FAST_ADV_INT_MAX 0x00F0 /* 150 msec */
1761 1762
1763#define NAME_RESOLVE_DURATION msecs_to_jiffies(10240) /* 10.24 sec */
1764
1762void mgmt_fill_version_info(void *ver);1765void mgmt_fill_version_info(void *ver);
1763int mgmt_new_settings(struct hci_dev *hdev);1766int mgmt_new_settings(struct hci_dev *hdev);
1764void mgmt_index_added(struct hci_dev *hdev);1767void mgmt_index_added(struct hci_dev *hdev);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t