From: Kalle Valo <kvalo@qca.qualcomm.com>
To: Thirumalai <tpachamu@qca.qualcomm.com>
Cc: <linux-wireless@vger.kernel.org>,
ath6kl-devel <ath6kl-devel@qualcomm.com>
Subject: Re: [PATCH 3/4] ath6kl: Add uAPSD support in rx path.
Date: Wed, 11 Jan 2012 14:55:34 +0200 [thread overview]
Message-ID: <4F0D86C6.1040304@qca.qualcomm.com> (raw)
In-Reply-To: <1326095135-1633-1-git-send-email-tpachamu@qca.qualcomm.com>
On 01/09/2012 09:45 AM, Thirumalai wrote:
> If uAPSD trigger is received, send out the packets in uAPSD
> queue. Set more data bit if the queue is not empty else
> update the uAPSD bitmap for the station.
>
> Signed-off-by: Thirumalai <tpachamu@qca.qualcomm.com>
[...]
> + /*
> + * If the APSD q for this STA is not empty, dequeue and
> + * send a pkt from the head of the q. Also update the
> + * More data bit in the WMI_DATA_HDR if there are
> + * more pkts for this STA in the APSD q.
> + * If there are no more pkts for this STA,
> + * update the APSD bitmap for this STA.
> + */
> +
> + num_frames_to_deliver = (conn->apsd_info >> 4) & 0xF;
Defines would be nice for values 4 and 0xF.
> +
> + /*
> + * Number of frames to send in a service period is
> + * indicated by the station
> + * in the QOS_INFO of the association request
> + * If it is zero, send all frames
> + */
> + if (!num_frames_to_deliver)
> + num_frames_to_deliver = 0xFFFF;
And for 0xFFFF.
> +
> + spin_lock_bh(&conn->psq_lock);
> + is_apsdq_empty = skb_queue_empty(&conn->apsdq);
Extra space after is_apsdq_empty.
> - while ((skbuff = skb_dequeue(&conn->psq))
> - != NULL) {
> + skbuff = skb_dequeue(&conn->psq);
> + while (skbuff != NULL) {
> + spin_unlock_bh(&conn->psq_lock);
> + ath6kl_data_tx(skbuff, vif->ndev);
> + spin_lock_bh(&conn->psq_lock);
> + skbuff = skb_dequeue(&conn->psq);
> + }
I would say the original style is better:
while ((skbuff = skb_dequeue(&conn->psq))
> +
> + is_apsdq_empty = skb_queue_empty(&conn->apsdq);
> + skbuff = skb_dequeue(&conn->apsdq);
> + while (skbuff != NULL) {
> spin_unlock_bh(&conn->psq_lock);
> ath6kl_data_tx(skbuff, vif->ndev);
> spin_lock_bh(&conn->psq_lock);
> + skbuff = skb_dequeue(&conn->apsdq);
> }
Same here.
Kalle
next prev parent reply other threads:[~2012-01-11 12:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-09 7:45 [PATCH 3/4] ath6kl: Add uAPSD support in rx path Thirumalai
2012-01-11 12:55 ` Kalle Valo [this message]
2012-01-11 13:15 ` Kalle Valo
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=4F0D86C6.1040304@qca.qualcomm.com \
--to=kvalo@qca.qualcomm.com \
--cc=ath6kl-devel@qualcomm.com \
--cc=linux-wireless@vger.kernel.org \
--cc=tpachamu@qca.qualcomm.com \
/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;
as well as URLs for NNTP newsgroup(s).