[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <C7C04F3A-EC21-4E71-9550-68E50901947D@holtmann.org>
Date: Wed, 19 Nov 2014 22:48:25 +0800
From: Marcel Holtmann <marcel@...tmann.org>
To: Steven Walter <stevenrwalter@...il.com>
Cc: "Gustavo F. Padovan" <gustavo@...ovan.org>,
Johan Hedberg <johan.hedberg@...il.com>,
BlueZ development <linux-bluetooth@...r.kernel.org>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] l2cap_core: automatically flushable packets aren't allowed on LE links
Hi Steven,
you need to prefix the subject line with Bluetooth: like all other patches do.
> On Nov 19, 2014, at 22:41, Steven Walter <stevenrwalter@...il.com> wrote:
>
> The bluetooth spec states that automatically flushable packets may not
> be sent over a LE-U link.
>
> Signed-off-by: Steven Walter <stevenrwalter@...il.com>
> ---
> net/bluetooth/l2cap_core.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
> index 4af3821..028fcc6 100644
> --- a/net/bluetooth/l2cap_core.c
> +++ b/net/bluetooth/l2cap_core.c
> @@ -764,7 +764,7 @@ static void l2cap_send_cmd(struct l2cap_conn *conn, u8 ident, u8 code, u16 len,
> if (!skb)
> return;
>
> - if (lmp_no_flush_capable(conn->hcon->hdev))
> + if (lmp_no_flush_capable(conn->hcon->hdev) || (conn->hcon->type == LE_LINK))
no need for ( ) around that new statement.
> flags = ACL_START_NO_FLUSH;
> else
> flags = ACL_START;
> @@ -798,8 +798,9 @@ static void l2cap_do_send(struct l2cap_chan *chan, struct sk_buff *skb)
> return;
> }
>
> - if (!test_bit(FLAG_FLUSHABLE, &chan->flags) &&
> - lmp_no_flush_capable(hcon->hdev))
> + if ((hcon->type == LE_LINK) ||
Same here, the ( ) are not needed.
> + (!test_bit(FLAG_FLUSHABLE, &chan->flags) &&
> + lmp_no_flush_capable(hcon->hdev)))
> flags = ACL_START_NO_FLUSH;
> else
> flags = ACL_START;
I wonder actually if we should have a helper function or add comments to explain why we are doing it this complicated.
Regards
Marcel
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists