linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: Fix remote name event return directly.
@ 2015-05-12 10:17 wesley.kuo
  2015-05-12 12:18 ` Johan Hedberg
  0 siblings, 1 reply; 2+ messages in thread
From: wesley.kuo @ 2015-05-12 10:17 UTC (permalink / raw)
  To: linux-bluetooth

From: wesleyku <wesley.kuo@intel.com>

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 <wesley.kuo@intel.com>
---
 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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Bluetooth: Fix remote name event return directly.
  2015-05-12 10:17 [PATCH] Bluetooth: Fix remote name event return directly wesley.kuo
@ 2015-05-12 12:18 ` Johan Hedberg
  0 siblings, 0 replies; 2+ messages in thread
From: Johan Hedberg @ 2015-05-12 12:18 UTC (permalink / raw)
  To: wesley.kuo; +Cc: linux-bluetooth

Hi Wesley,

On Tue, May 12, 2015, wesley.kuo@intel.com wrote:
> From: wesleyku <wesley.kuo@intel.com>

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-05-12 12:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-12 10:17 [PATCH] Bluetooth: Fix remote name event return directly wesley.kuo
2015-05-12 12:18 ` Johan Hedberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).