linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Add temporary workaround to skip wrong OMTU for basic rate
@ 2011-04-07 17:31 Claudio Takahasi
  2011-04-09 17:49 ` Johan Hedberg
  0 siblings, 1 reply; 2+ messages in thread
From: Claudio Takahasi @ 2011-04-07 17:31 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Claudio Takahasi

This patch is required until MTU kernel patch is not integrated. Kernel
is returning zero for basic rate OMTU.
---
 attrib/gattrib.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/attrib/gattrib.c b/attrib/gattrib.c
index 290cd96..8c15e52 100644
--- a/attrib/gattrib.c
+++ b/attrib/gattrib.c
@@ -409,7 +409,7 @@ GAttrib *g_attrib_new(GIOChannel *io)
 	if (bt_io_get(attrib->io, BT_IO_L2CAP, NULL,
 			BT_IO_OPT_OMTU, &omtu,
 			BT_IO_OPT_INVALID)) {
-		if (omtu > ATT_MAX_MTU)
+		if (omtu == 0 || omtu > ATT_MAX_MTU)
 			omtu = ATT_MAX_MTU;
 	} else
 		omtu = ATT_DEFAULT_LE_MTU;
-- 
1.7.4.1


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

* Re: [PATCH] Add temporary workaround to skip wrong OMTU for basic rate
  2011-04-07 17:31 [PATCH] Add temporary workaround to skip wrong OMTU for basic rate Claudio Takahasi
@ 2011-04-09 17:49 ` Johan Hedberg
  0 siblings, 0 replies; 2+ messages in thread
From: Johan Hedberg @ 2011-04-09 17:49 UTC (permalink / raw)
  To: Claudio Takahasi; +Cc: linux-bluetooth

Hi Claudio,

On Thu, Apr 07, 2011, Claudio Takahasi wrote:
> This patch is required until MTU kernel patch is not integrated. Kernel
> is returning zero for basic rate OMTU.
> ---
>  attrib/gattrib.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

Pushed upstream with a minor tweak to the commit message: this can't
really be considered so temporary if there are kernels out there that
return the wrong value. In that case we'll need to keep the workaround
for quite some time.

Johan

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

end of thread, other threads:[~2011-04-09 17:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-07 17:31 [PATCH] Add temporary workaround to skip wrong OMTU for basic rate Claudio Takahasi
2011-04-09 17:49 ` 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).