Skip to contentSkip to conversation

Bluetooth: Fix remote name event return directly.

PATCH In review [email protected] 2 participants 2 messages May 13, 2015 – May 14, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 Bluetooth: Fix remote name event return directly.

From: Wesley Kuo <[email protected]>

This patch fixes hci_remote_name_evt dose not resolve name during discovery status is RESOLVING. Before simultaneous dual mode scan enabled, hci_check_pending_name will set discovery status to STOPPED eventually.

---
 net/bluetooth/hci_core.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
net/bluetooth/hci_core.c +4 -2
index 476709b..755a147 100644
@@ -2853,9 +2853,11 @@ static void le_scan_disable_work_complete(struct hci_dev *hdev, u8 status,
 			 * state. If we were running both LE and BR/EDR inquiry
 			 * simultaneously, and BR/EDR inquiry is already
 			 * finished, stop discovery, otherwise BR/EDR inquiry
-			 * will stop discovery when finished.
+			 * will stop discovery when finished. If we will resolve
+			 * remote device name, do not change discovery state.
 			 */
-			if (!test_bit(HCI_INQUIRY, &hdev->flags))
+			if (!test_bit(HCI_INQUIRY, &hdev->flags) &&
+			    hdev->discovery.state != DISCOVERY_RESOLVING)
 				hci_discovery_set_state(hdev,
 							DISCOVERY_STOPPED);
 		} else {
Signature · 1 line
1.7.9.5
maintainer
#1 lore raw

Hi Wesley,

Quoted 8 lines

This patch fixes hci_remote_name_evt dose not resolve name during discovery status is RESOLVING. Before simultaneous dual mode scan enabled, hci_check_pending_name will set discovery status to STOPPED eventually.

---
net/bluetooth/hci_core.c | 6 ++++--

1 file changed, 4 insertions(+), 2 deletions(-)

patch has been applied to bluetooth tree.

Regards

Marcel