Skip to contentSkip to conversation

Bluetooth: Fix remote name event return directly.

PATCH Superseded [email protected] 2 participants 2 messages May 12, 2015

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

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

From: wesleyku <[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 |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
net/bluetooth/hci_core.c +2 -1
index 476709b..69fda7e 100644
@@ -2855,7 +2855,8 @@ static void le_scan_disable_work_complete(struct hci_dev *hdev, u8 status,
 			 * finished, stop discovery, otherwise BR/EDR inquiry
 			 * will stop discovery when finished.
 			 */
-			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
#1 lore raw

Hi Wesley,

Quoted 1 line · On Tue, May 12, 2015, [email protected] wrote:

From: wesleyku <[email protected]>

You probably want to fix up your git author name to be of "First Last" format. I don't think something like the above is acceptable to the git history.

net/bluetooth/hci_core.c static void le_scan_disable_work_complete(struct hci_dev *hdev, u8 status, · line 2861

Quoted 9 lines
net/bluetooth/hci_core.c +2 -1
@@ -2855,7 +2855,8 @@ static void le_scan_disable_work_complete(struct hci_dev *hdev, u8 status,
 			 * finished, stop discovery, otherwise BR/EDR inquiry
 			 * will stop discovery when finished.
 			 */
-			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);

Does the code comment above this if-statement also need additions or clarifying? If so, please add that.

Johan