From: Marcel Holtmann <marcel@holtmann.org>
To: "Gustavo F. Padovan" <padovan@profusion.mobi>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH 2/2] Bluetooth: Remove HCI_PRIO_MAX from ctrl cdm in RFCOMM
Date: Tue, 20 Dec 2011 13:01:06 -0800 [thread overview]
Message-ID: <1324414866.1965.133.camel@aeonflux> (raw)
In-Reply-To: <1324408558-24653-2-git-send-email-padovan@profusion.mobi>
Hi Gustavo,
> RFCOMM needs a proper priority mechanism inside itself and not try to use
> l2cap priority to fix its own problem.
<snip>
> static void rfcomm_make_uih(struct sk_buff *skb, u8 addr)
> @@ -1786,8 +1776,15 @@ static inline int rfcomm_process_tx(struct rfcomm_dlc *d)
> return skb_queue_len(&d->tx_queue);
>
> while (d->tx_credits && (skb = skb_dequeue(&d->tx_queue))) {
> - err = rfcomm_send_frame(d->session, skb->data, skb->len,
> - skb->priority);
> + struct socket *sock = d->session->sock;
> + struct sock *sk = sock->sk;
> +
> + if (sk->sk_priority != skb->priority) {
> + lock_sock(sk);
> + sk->sk_priority = skb->priority;
> + release_sock(sk);
> + }
> + err = rfcomm_send_frame(d->session, skb->data, skb->len);
> if (err < 0) {
> skb_queue_head(&d->tx_queue, skb);
> break;
coming to think about this, we might not even bother setting the
sk->sk_priority at all here. Lets just forget about RFCOMM.
Regards
Marcel
next prev parent reply other threads:[~2011-12-20 21:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-20 19:15 [PATCH 1/2] Bluetooth: fix bt_accept_dequeue() to work in process context Gustavo F. Padovan
2011-12-20 19:15 ` [PATCH 2/2] Bluetooth: Remove HCI_PRIO_MAX from ctrl cdm in RFCOMM Gustavo F. Padovan
2011-12-20 21:01 ` Marcel Holtmann [this message]
2011-12-29 15:16 ` Luiz Augusto von Dentz
2011-12-29 17:45 ` Marcel Holtmann
2012-01-02 13:16 ` Luiz Augusto von Dentz
2012-01-02 18:43 ` Marcel Holtmann
2011-12-20 20:58 ` [PATCH 1/2] Bluetooth: fix bt_accept_dequeue() to work in process context 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=1324414866.1965.133.camel@aeonflux \
--to=marcel@holtmann.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox