[PATCH 2/2] Add constant for interleaved discovery window

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 src/adapter.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/adapter.c b/src/adapter.c
index 69fd5be..32ec71d 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -59,6 +59,9 @@
 #include "attrib-server.h"
 #include "att.h"
 
+/* Interleaved discovery window: 5.12 sec */
+#define GAP_INTER_DISCOV_WIN		5120
+
 /* Flags Descriptions */
 #define EIR_LIM_DISC                0x01 /* LE Limited Discoverable Mode */
 #define EIR_GEN_DISC                0x02 /* LE General Discoverable Mode */
@@ -2831,11 +2834,12 @@ void adapter_set_state(struct btd_adapter *adapter, int state)
 		if (!adapter->disc_sessions)
 			break;
 
-		/* Scanning enabled */
-		adapter->stop_discov_id = g_timeout_add(5120, stop_scanning,
+		/* Stop scanning after TGAP(100)/2 */
+		adapter->stop_discov_id = g_timeout_add(GAP_INTER_DISCOV_WIN,
+							stop_scanning,
 							adapter);
 
-		/* For dual mode: don't send "Discovering = TRUE"  */
+		/* For dual mode: don't send "Discovering = TRUE" (twice) */
 		if (bredr_capable(adapter) == TRUE)
 			return;
 
-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux