All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ville Tervo <ville.tervo@nokia.com>
To: "ext Gustavo F. Padovan" <gustavo@padovan.org>
Cc: "linux-bluetooth@vger.kernel.org"
	<linux-bluetooth@vger.kernel.org>,
	"Gustavo F. Padovan" <padovan@profusion.mobi>
Subject: Re: [PATCH] Bluetooth: Don't send RFC for Basic Mode if only it is supported
Date: Fri, 30 Jul 2010 16:13:00 +0300	[thread overview]
Message-ID: <4C52CFDC.9070907@nokia.com> (raw)
In-Reply-To: <1280426444-20469-1-git-send-email-gustavo@padovan.org>

Hi,

On 07/29/2010 09:00 PM, ext Gustavo F. Padovan wrote:
> From: Gustavo F. Padovan<padovan@profusion.mobi>
>
> If the remote side doesn't support Enhanced Retransmission Mode neither
> Streaming Mode, we shall not send the RFC option.
> Some devices that only supports Basic Mode do not understanding the RFC
> option. This patch fix the regression found with that devices.


Yes this is better. After some research i found out that quite many old 
devices are not handling properly unknown options.

However I found another regression. And this kind of patch is needed 
also. Otherwise the info rsp code is reading feat_mask from failed 
response (and does invalid memory access).


diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c
index 0f34e12..1e174a4 100644
--- a/net/bluetooth/l2cap.c
+++ b/net/bluetooth/l2cap.c
@@ -3348,6 +3348,13 @@ static inline int l2cap_information_rsp(struct 
l2cap_conn *conn, struct l2cap_cm

         del_timer(&conn->info_timer);

+       if (result != L2CAP_IR_SUCCESS) {
+               conn->info_state |= L2CAP_INFO_FEAT_MASK_REQ_DONE;
+               conn->info_ident = 0;
+               l2cap_conn_start(conn);
+               return 0;
+       }
+
         if (type == L2CAP_IT_FEAT_MASK) {
                 conn->feat_mask = get_unaligned_le32(rsp->data);



-- 
Ville

  parent reply	other threads:[~2010-07-30 13:13 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-27  9:07 L2CAP unknown options Ville Tervo
2010-07-28  3:32 ` Gustavo F. Padovan
2010-07-28  7:11   ` [PATCH] Bluetooth: Resend ConfigReq on unknown options failure Gustavo F. Padovan
2010-07-28  7:16     ` Gustavo F. Padovan
2010-07-28 12:21       ` Ville Tervo
2010-07-29 18:00         ` [PATCH] Bluetooth: Don't send RFC for Basic Mode if only it is supported Gustavo F. Padovan
2010-07-29 18:04           ` Gustavo F. Padovan
2010-07-30 13:13           ` Ville Tervo [this message]
2010-07-31 22:41             ` Gustavo F. Padovan
2010-08-04  1:56               ` Marcel Holtmann
2010-08-04  6:18                 ` Ville Tervo
2010-07-28  4:16 ` L2CAP unknown options Gustavo F. Padovan
  -- strict thread matches above, loose matches on Subject: below --
2010-08-04  2:49 [PATCH] Bluetooth: Don't send RFC for Basic Mode if only it is supported Gustavo F. Padovan
2010-08-04 14:27 ` Marcel Holtmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C52CFDC.9070907@nokia.com \
    --to=ville.tervo@nokia.com \
    --cc=gustavo@padovan.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=padovan@profusion.mobi \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.