summaryrefslogtreecommitdiff
path: root/attrib
diff options
context:
space:
mode:
authorAndre Guedes <andre.guedes@openbossa.org>2012-06-06 21:41:03 -0300
committerJohan Hedberg <johan.hedberg@intel.com>2012-06-07 04:27:46 +0300
commit7dc92fb8079a01037faab71ecc90fe2fb6221d58 (patch)
treef723a8b1fccb07938c6fdb1f0678692131ae0962 /attrib
parent7125410781ac8b2c0706efa9712846e6ce5b4804 (diff)
Remove workaround in gatt_connect
This workaround is not necessary anymore since setsockopt is now checking for minimum MTU.
Diffstat (limited to 'attrib')
-rw-r--r--attrib/utils.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/attrib/utils.c b/attrib/utils.c
index f809b1f1a..d856fe2a3 100644
--- a/attrib/utils.c
+++ b/attrib/utils.c
@@ -36,10 +36,6 @@
#include "btio.h"
#include "gatttool.h"
-/* Minimum MTU for ATT connections */
-#define ATT_MIN_MTU_LE 23
-#define ATT_MIN_MTU_L2CAP 48
-
GIOChannel *gatt_connect(const gchar *src, const gchar *dst,
const gchar *dst_type, const gchar *sec_level,
int psm, int mtu, BtIOConnect connect_cb)
@@ -49,15 +45,6 @@ GIOChannel *gatt_connect(const gchar *src, const gchar *dst,
uint8_t dest_type;
GError *err = NULL;
BtIOSecLevel sec;
- int minimum_mtu;
-
- /* This check is required because currently setsockopt() returns no
- * errors for MTU values smaller than the allowed minimum. */
- minimum_mtu = psm ? ATT_MIN_MTU_L2CAP : ATT_MIN_MTU_LE;
- if (mtu != 0 && mtu < minimum_mtu) {
- g_printerr("MTU cannot be smaller than %d\n", minimum_mtu);
- return NULL;
- }
/* Remote device */
if (dst == NULL) {