2015-05-12 10:17:17

by wesley.kuo

[permalink] [raw]
Subject: [PATCH] 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.

Signed-off-by: wesleyku <[email protected]>
---
net/bluetooth/hci_core.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 476709b..69fda7e 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -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 {
--
1.7.9.5



2015-05-12 12:18:48

by Hedberg, Johan

[permalink] [raw]
Subject: Re: [PATCH] Bluetooth: Fix remote name event return directly.

Hi Wesley,

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.

> @@ -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