From: Marcel Holtmann <marcel@holtmann.org>
To: Gustavo Padovan <gustavo@padovan.org>
Cc: linux-bluetooth@vger.kernel.org,
Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Subject: Re: [PATCH] Bluetooth: Do not purge queue in Basic Mode
Date: Fri, 18 May 2012 15:09:28 -0700 [thread overview]
Message-ID: <1337378968.2058.29.camel@aeonflux> (raw)
In-Reply-To: <1337378582-29271-1-git-send-email-gustavo@padovan.org>
Hi Gustavo,
> chan->tx_q is only initialized if we use ERTM or Streaming mode.
>
> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
> ---
> net/bluetooth/l2cap_core.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
> index b70dca4..ccd2d85 100644
> --- a/net/bluetooth/l2cap_core.c
> +++ b/net/bluetooth/l2cap_core.c
> @@ -549,6 +549,9 @@ static void l2cap_chan_del(struct l2cap_chan *chan, int err)
> if (test_bit(CONF_NOT_COMPLETE, &chan->conf_state))
> return;
>
> + if (chan->mode == L2CAP_MODE_BASIC)
> + return;
> +
> skb_queue_purge(&chan->tx_q);
>
> if (chan->mode == L2CAP_MODE_ERTM) {
please turn this into a switch statement. No point in checking
chan->mode twice.
Regards
Marcel
prev parent reply other threads:[~2012-05-18 22:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-18 22:03 [PATCH] Bluetooth: Do not purge queue in Basic Mode Gustavo Padovan
2012-05-18 22:09 ` Marcel Holtmann [this message]
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=1337378968.2058.29.camel@aeonflux \
--to=marcel@holtmann.org \
--cc=gustavo.padovan@collabora.co.uk \
--cc=gustavo@padovan.org \
--cc=linux-bluetooth@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox