linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mt76x2: fix mrr idx/count estimation in mt76x2_mac_fill_tx_status()
       [not found] <cover.1528098972.git.lorenzo.bianconi@redhat.com>
@ 2018-06-04  9:19 ` Lorenzo Bianconi
  2018-06-27 16:05   ` Kalle Valo
  0 siblings, 1 reply; 2+ messages in thread
From: Lorenzo Bianconi @ 2018-06-04  9:19 UTC (permalink / raw)
  To: nbd; +Cc: linux-wireless

Fix mcs and attempt count estimation in mt76x2_mac_fill_tx_status routine
if the number of tx retries reported by the hw is grater than
IEEE80211_TX_MAX_RATES

Fixes: 7bc04215a66b ("mt76: add driver code for MT76x2e")
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
---
 drivers/net/wireless/mediatek/mt76/mt76x2_mac.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2_mac.c b/drivers/net/wireless/mediatek/mt76/mt76x2_mac.c
index b49aea4da2d6..8985446570bd 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x2_mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x2_mac.c
@@ -439,15 +439,13 @@ mt76x2_mac_fill_tx_status(struct mt76x2_dev *dev,
 	if (last_rate < IEEE80211_TX_MAX_RATES - 1)
 		rate[last_rate + 1].idx = -1;
 
-	cur_idx = rate[last_rate].idx + st->retry;
+	cur_idx = rate[last_rate].idx + last_rate;
 	for (i = 0; i <= last_rate; i++) {
 		rate[i].flags = rate[last_rate].flags;
 		rate[i].idx = max_t(int, 0, cur_idx - i);
 		rate[i].count = 1;
 	}
-
-	if (last_rate > 0)
-		rate[last_rate - 1].count = st->retry + 1 - last_rate;
+	rate[last_rate].count = st->retry + 1 - last_rate;
 
 	info->status.ampdu_len = n_frames;
 	info->status.ampdu_ack_len = st->success ? n_frames : 0;
-- 
2.14.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: mt76x2: fix mrr idx/count estimation in mt76x2_mac_fill_tx_status()
  2018-06-04  9:19 ` [PATCH] mt76x2: fix mrr idx/count estimation in mt76x2_mac_fill_tx_status() Lorenzo Bianconi
@ 2018-06-27 16:05   ` Kalle Valo
  0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2018-06-27 16:05 UTC (permalink / raw)
  To: Lorenzo Bianconi; +Cc: nbd, linux-wireless

Lorenzo Bianconi <lorenzo.bianconi@redhat.com> wrote:

> Fix mcs and attempt count estimation in mt76x2_mac_fill_tx_status routine
> if the number of tx retries reported by the hw is grater than
> IEEE80211_TX_MAX_RATES
> 
> Fixes: 7bc04215a66b ("mt76: add driver code for MT76x2e")
> Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>

Patch applied to wireless-drivers-next.git, thanks.

2d1e9be00162 mt76x2: fix mrr idx/count estimation in mt76x2_mac_fill_tx_status()

-- 
https://patchwork.kernel.org/patch/10446149/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-06-27 16:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <cover.1528098972.git.lorenzo.bianconi@redhat.com>
2018-06-04  9:19 ` [PATCH] mt76x2: fix mrr idx/count estimation in mt76x2_mac_fill_tx_status() Lorenzo Bianconi
2018-06-27 16:05   ` Kalle Valo

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).