From: Felix Fietkau <nbd@openwrt.org>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>,
John Linville <linville@tuxdriver.com>,
linux-wireless@vger.kernel.org
Subject: Re: [PATCH] mac80211: fix an issue in ieee80211_tx_info count field management
Date: Thu, 12 Apr 2012 09:24:53 +0200 [thread overview]
Message-ID: <4F868345.2010009@openwrt.org> (raw)
In-Reply-To: <1334203438.3788.11.camel@jlt3.sipsolutions.net>
On 2012-04-12 6:03 AM, Johannes Berg wrote:
> On Fri, 2012-04-06 at 20:48 +0200, Lorenzo Bianconi wrote:
>> Hi,
>>
>> I noticed a possible issue in the status count field management of the
>> ieee80211_tx_info data structure. In particular, when the AGGR
>> processing is employed,
>> status.rates[].count is set just for the first frame and not for
>> others belonging to the same burst, leading to wrong statistic data in
>> the mac80211 debug file system.
>>
>> Regards
>>
>> Lorenzo
>>
>> Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
>> ---
>> --- a/net/mac80211/status.c
>> +++ b/net/mac80211/status.c
>> @@ -355,7 +355,13 @@
>> int rtap_len;
>>
>> for (i = 0; i < IEEE80211_TX_MAX_RATES; i++) {
>> - if (info->status.rates[i].idx < 0) {
>> + if ((info->flags & IEEE80211_TX_CTL_AMPDU) &&
>> + !(info->flags & IEEE80211_TX_STAT_AMPDU)) {
>> + /* just the first aggr frame carry status info */
>> + info->status.rates[i].idx = -1;
>> + info->status.rates[i].count = 0;
>> + break;
>> + } else if (info->status.rates[i].idx < 0) {
>
> Is that really the way all drivers do it? I know ath9k seems to do it
> that way, but I don't think all drivers do. ath9k is probably the
> exception rather than the rule, at least today
At least minstrel_ht expects it this way. If I understand iwlwifi
correctly, it reports tx status in a similar way - on completion in
iwlagn_rx_reply_compressed_ba(), the first subframe carries the
information for an entire A-MPDU, the other subframes are not touched.
- Felix
prev parent reply other threads:[~2012-04-12 7:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-06 18:48 [PATCH] mac80211: fix an issue in ieee80211_tx_info count field management Lorenzo Bianconi
2012-04-12 4:03 ` Johannes Berg
2012-04-12 7:24 ` 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=4F868345.2010009@openwrt.org \
--to=nbd@openwrt.org \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=lorenzo.bianconi83@gmail.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).