diff options
author | Lorenzo Bianconi <lorenzo.bianconi83@gmail.com> | 2012-04-06 14:48:15 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-04-13 14:32:49 -0400 |
commit | d01b31604c55c52e08fbc6fc160137a12983df64 (patch) | |
tree | e8c9f270c29af34f5e0dc1e9864c3daac91a9ae5 /net/mac80211/status.c | |
parent | d91df0e3a1b9a7427785cb8d28be073df9b18b78 (diff) |
mac80211: fix an issue in ieee80211_tx_info count field management
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.
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/status.c')
-rw-r--r-- | net/mac80211/status.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/net/mac80211/status.c b/net/mac80211/status.c index 5f8f89e89d6..05f257aa2e0 100644 --- a/net/mac80211/status.c +++ b/net/mac80211/status.c | |||
@@ -355,7 +355,13 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
355 | int rtap_len; | 355 | int rtap_len; |
356 | 356 | ||
357 | for (i = 0; i < IEEE80211_TX_MAX_RATES; i++) { | 357 | for (i = 0; i < IEEE80211_TX_MAX_RATES; i++) { |
358 | if (info->status.rates[i].idx < 0) { | 358 | if ((info->flags & IEEE80211_TX_CTL_AMPDU) && |
359 | !(info->flags & IEEE80211_TX_STAT_AMPDU)) { | ||
360 | /* just the first aggr frame carry status info */ | ||
361 | info->status.rates[i].idx = -1; | ||
362 | info->status.rates[i].count = 0; | ||
363 | break; | ||
364 | } else if (info->status.rates[i].idx < 0) { | ||
359 | break; | 365 | break; |
360 | } else if (i >= hw->max_report_rates) { | 366 | } else if (i >= hw->max_report_rates) { |
361 | /* the HW cannot have attempted that rate */ | 367 | /* the HW cannot have attempted that rate */ |