linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/1]
@ 2011-02-16 22:25 Brian Gix
  2011-02-16 22:25 ` [PATCH 1/1] Fix gatttool to use existing MTU defines Brian Gix
  0 siblings, 1 reply; 2+ messages in thread
From: Brian Gix @ 2011-02-16 22:25 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: johan.hedberg, padovan, anderson.lizardo

Per Anderson request --> header based #defines used.

-- 
Brian Gix
bgix@codeaurora.org
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum

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

* [PATCH 1/1] Fix gatttool to use existing MTU defines
  2011-02-16 22:25 [PATCH 0/1] Brian Gix
@ 2011-02-16 22:25 ` Brian Gix
  0 siblings, 0 replies; 2+ messages in thread
From: Brian Gix @ 2011-02-16 22:25 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: johan.hedberg, padovan, anderson.lizardo, Brian Gix

---
 attrib/gatttool.c |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/attrib/gatttool.c b/attrib/gatttool.c
index 38636f9..7391eb3 100644
--- a/attrib/gatttool.c
+++ b/attrib/gatttool.c
@@ -44,10 +44,6 @@
 #include "gatt.h"
 #include "gatttool.h"
 
-/* Minimum MTU for ATT connections */
-#define ATT_MIN_MTU_LE		23
-#define ATT_MIN_MTU_L2CAP	48
-
 static gchar *opt_src = NULL;
 static gchar *opt_dst = NULL;
 static gchar *opt_value = NULL;
@@ -94,9 +90,10 @@ GIOChannel *do_connect(gchar *dst, gboolean le, BtIOConnect connect_cb)
 
 	/* This check is required because currently setsockopt() returns no
 	 * errors for MTU values smaller than the allowed minimum. */
-	if (opt_mtu != 0 && opt_mtu < (le ? ATT_MIN_MTU_LE : ATT_MIN_MTU_L2CAP)) {
+	if (opt_mtu != 0 &&
+		opt_mtu < (le ? ATT_DEFAULT_LE_MTU : ATT_DEFAULT_L2CAP_MTU)) {
 		g_printerr("MTU cannot be smaller than %d\n",
-				(le ? ATT_MIN_MTU_LE : ATT_MIN_MTU_L2CAP));
+				le ? ATT_DEFAULT_LE_MTU : ATT_DEFAULT_L2CAP_MTU);
 		return NULL;
 	}
 
-- 
1.7.1

-- 
Brian Gix
bgix@codeaurora.org
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum

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

end of thread, other threads:[~2011-02-16 22:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-16 22:25 [PATCH 0/1] Brian Gix
2011-02-16 22:25 ` [PATCH 1/1] Fix gatttool to use existing MTU defines Brian Gix

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).