提交 da027ca0 编写于 作者: J Jouni Malinen 提交者: John W. Linville

ath9k: Fix TX status reporting for retries and MCS index

The count field in struct ieee80211_tx_rate does not include the final
successful attempt, so only report retries here.

Fix the struct ieee80211_tx_rate::idx field when MCS was used. It is
supposed to be the MCS index, not an internal index to the rate
control algorithm table.
Signed-off-by: NJouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 8d6f658e
......@@ -125,7 +125,15 @@ static void ath_tx_complete(struct ath_softc *sc, struct sk_buff *skb,
tx_info->flags |= IEEE80211_TX_STAT_ACK;
}
tx_info->status.rates[0].count = tx_status->retries + 1;
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;
}
ieee80211_tx_status(hw, skb);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册