diff options
Diffstat (limited to 'drivers/net/wireless/b43legacy/pio.c')
-rw-r--r-- | drivers/net/wireless/b43legacy/pio.c | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/drivers/net/wireless/b43legacy/pio.c b/drivers/net/wireless/b43legacy/pio.c index a86c7647fa2d..746d5361bba0 100644 --- a/drivers/net/wireless/b43legacy/pio.c +++ b/drivers/net/wireless/b43legacy/pio.c | |||
@@ -491,6 +491,7 @@ void b43legacy_pio_handle_txstatus(struct b43legacy_wldev *dev, | |||
491 | struct b43legacy_pioqueue *queue; | 491 | struct b43legacy_pioqueue *queue; |
492 | struct b43legacy_pio_txpacket *packet; | 492 | struct b43legacy_pio_txpacket *packet; |
493 | struct ieee80211_tx_info *info; | 493 | struct ieee80211_tx_info *info; |
494 | int retry_limit; | ||
494 | 495 | ||
495 | queue = parse_cookie(dev, status->cookie, &packet); | 496 | queue = parse_cookie(dev, status->cookie, &packet); |
496 | B43legacy_WARN_ON(!queue); | 497 | B43legacy_WARN_ON(!queue); |
@@ -503,11 +504,37 @@ void b43legacy_pio_handle_txstatus(struct b43legacy_wldev *dev, | |||
503 | sizeof(struct b43legacy_txhdr_fw3)); | 504 | sizeof(struct b43legacy_txhdr_fw3)); |
504 | 505 | ||
505 | info = IEEE80211_SKB_CB(packet->skb); | 506 | info = IEEE80211_SKB_CB(packet->skb); |
506 | memset(&info->status, 0, sizeof(info->status)); | 507 | |
508 | /* preserve the confiured retry limit before clearing the status | ||
509 | * The xmit function has overwritten the rc's value with the actual | ||
510 | * retry limit done by the hardware */ | ||
511 | retry_limit = info->status.rates[0].count; | ||
512 | ieee80211_tx_info_clear_status(info); | ||
507 | 513 | ||
508 | if (status->acked) | 514 | if (status->acked) |
509 | info->flags |= IEEE80211_TX_STAT_ACK; | 515 | info->flags |= IEEE80211_TX_STAT_ACK; |
510 | info->status.retry_count = status->frame_count - 1; | 516 | |
517 | if (status->rts_count > dev->wl->hw->conf.short_frame_max_tx_count) { | ||
518 | /* | ||
519 | * If the short retries (RTS, not data frame) have exceeded | ||
520 | * the limit, the hw will not have tried the selected rate, | ||
521 | * but will have used the fallback rate instead. | ||
522 | * Don't let the rate control count attempts for the selected | ||
523 | * rate in this case, otherwise the statistics will be off. | ||
524 | */ | ||
525 | info->status.rates[0].count = 0; | ||
526 | info->status.rates[1].count = status->frame_count; | ||
527 | } else { | ||
528 | if (status->frame_count > retry_limit) { | ||
529 | info->status.rates[0].count = retry_limit; | ||
530 | info->status.rates[1].count = status->frame_count - | ||
531 | retry_limit; | ||
532 | |||
533 | } else { | ||
534 | info->status.rates[0].count = status->frame_count; | ||
535 | info->status.rates[1].idx = -1; | ||
536 | } | ||
537 | } | ||
511 | ieee80211_tx_status_irqsafe(dev->wl->hw, packet->skb); | 538 | ieee80211_tx_status_irqsafe(dev->wl->hw, packet->skb); |
512 | packet->skb = NULL; | 539 | packet->skb = NULL; |
513 | 540 | ||