All of lore.kernel.org
 help / color / mirror / Atom feed
From: Felix Fietkau <nbd@openwrt.org>
To: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Cc: linux-wireless@vger.kernel.org, linville@tuxdriver.com
Subject: Re: [PATCH] ath9k: fix regression in sending aggregated packets
Date: Sat, 27 Aug 2011 10:50:33 +0200	[thread overview]
Message-ID: <4E58AFD9.6070108@openwrt.org> (raw)
In-Reply-To: <20110827083520.GA4063@vmraj-lnx.users.atheros.com>

On 2011-08-27 10:35 AM, Rajkumar Manoharan wrote:
> On Sat, Aug 27, 2011 at 10:25:27AM +0200, Felix Fietkau wrote:
>>  The recent commit "ath9k: Send legacy rated frames as unaggregated"
>>  introduced a check to ensure that packets with non-MCS rates set in
>>  the rate series will not be aggregated. However, it failed to check
>>  if the rate series is valid before testing the flags, thus breaking
>>  aggregation for normal MCS-only packets if the last series is unset.
>>
>>  Signed-off-by: Felix Fietkau<nbd@openwrt.org>
>>  ---
>>   drivers/net/wireless/ath/ath9k/xmit.c |    5 ++++-
>>   1 files changed, 4 insertions(+), 1 deletions(-)
>>
>>  diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
>>  index 5e29829..ac393a6 100644
>>  --- a/drivers/net/wireless/ath/ath9k/xmit.c
>>  +++ b/drivers/net/wireless/ath/ath9k/xmit.c
>>  @@ -582,7 +582,10 @@ static bool ath_lookup_legacy(struct ath_buf *bf)
>>   	tx_info = IEEE80211_SKB_CB(skb);
>>   	rates = tx_info->control.rates;
>>
>>  -	for (i = 3; i>= 0; i--) {
>>  +	for (i = 0; i<  4; i++) {
>>  +		if (!rates[i].count || rates[i].idx<  0)
>>  +			break;
>>  +
> Good catch. Let it be descending order that helps to reduce number of iteration in case of
> ath9k_rate_control.
That would really just be a very minor micro-optimization and it would 
make finding the first invalid rate harder and the code more convoluted. 
I don't think it's worth changing the patch for that.

- Felix

      reply	other threads:[~2011-08-27  8:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-27  8:25 [PATCH] ath9k: fix regression in sending aggregated packets Felix Fietkau
2011-08-27  8:35 ` Rajkumar Manoharan
2011-08-27  8:50   ` Felix Fietkau [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=4E58AFD9.6070108@openwrt.org \
    --to=nbd@openwrt.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=rmanohar@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 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.