Skip to contentSkip to conversation

ath9k: Revert fix to TX status reporting for retries and MCS index

PATCH New Jouni Malinen 1 participant 1 message Dec 22, 2008 Networking drivers (wireless)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ath9k: Revert fix to TX status reporting for retries and MCS index

This patch reverts commit 17a0d0d402b9ea64c1097ef61b63250b7506669f because that change ended up breaking ath9k rate control. While the MCS index reporting to mac80211 was indeed fixed by the patch, it did not take into account that the ath9k rate control algorithm was updating private tables based on this index and the index comes through the rate control API call, i.e., based on mac80211 TX status call. In addition, it looks like the "fix" to remove +1 from TX status 'count' field was not correct based on ieee80211_tx_status() implementation that counts the total of count values, but starting from -1, not 0.

The TX status reporting for frames using MCS needs to be fixed somehow, but it does not look like there is any easy fix for the ath9k rate control algorithm, so the best option now seems to be to revert the change and bring it back once the rate control code is cleaned up to handle this better.

---
 drivers/net/wireless/ath9k/xmit.c |   10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)
drivers/net/wireless/ath9k/xmit.c +1 -9
@@ -126,15 +126,7 @@ static void ath_tx_complete(struct ath_s
 		tx_info->flags |= IEEE80211_TX_STAT_ACK;
 	}
 
-	tx_info->status.rates[0].count = tx_status->retries;
-	if (tx_info->status.rates[0].flags & IEEE80211_TX_RC_MCS) {
-		/* Change idx from internal table index to MCS index */
-		int idx = tx_info->status.rates[0].idx;
-		struct ath_rate_table *rate_table = sc->cur_rate_table;
-		if (idx >= 0 && idx < rate_table->rate_cnt)
-			tx_info->status.rates[0].idx =
-				rate_table->info[idx].ratecode & 0x7f;
-	}
+	tx_info->status.rates[0].count = tx_status->retries + 1;
 
 	hdrlen = ieee80211_get_hdrlen_from_skb(skb);
 	padsize = hdrlen & 3;
Signature · 1 line
Jouni Malinen                                            PGP id EFC895FA