mt7603: fix tx status info

Reporting A-MPDU length from txs does not work, because only completed
subframes are reported. Trying to aggregate tx status report for one
completed A-MPDU does not work, because individual subframe retries can
be different.
Do not report A-MPDU length > 1 and pass individual subframe tx status
information to mac80211 to fix rate control errors

Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
Felix Fietkau
2019-01-16 19:53:45 +01:00
parent 63bf183451
commit e45db12888
2 changed files with 10 additions and 31 deletions
+10 -27
View File
@@ -998,39 +998,22 @@ mt7603_fill_txs(struct mt7603_dev *dev, struct mt7603_sta *sta,
final_rate = FIELD_GET(MT_TXS0_TX_RATE, txs);
ack_timeout = txs & MT_TXS0_ACK_TIMEOUT;
if (!(txs & MT_TXS0_ACK_ERROR_MASK)) {
if (!fixed_rate && !ack_timeout)
sta->ampdu_acked++;
info->flags |= IEEE80211_TX_STAT_ACK;
}
if (!fixed_rate)
sta->ampdu_count++;
sta->ampdu_tx_count = max_t(int, sta->ampdu_tx_count, count);
if (ampdu && !final_mpdu)
if (!ampdu && (txs & MT_TXS0_RTS_TIMEOUT))
return false;
if (fixed_rate) {
info->status.ampdu_len = 1;
info->status.ampdu_ack_len = !!(info->flags &
IEEE80211_TX_STAT_ACK);
} else {
info->status.ampdu_len = sta->ampdu_count;
info->status.ampdu_ack_len = sta->ampdu_acked;
if (info->status.ampdu_ack_len)
info->flags |= IEEE80211_TX_STAT_ACK;
}
if (txs & MT_TXS0_QUEUE_TIMEOUT)
return false;
if (!ack_timeout)
info->flags |= IEEE80211_TX_STAT_ACK;
info->status.ampdu_len = 1;
info->status.ampdu_ack_len = !!(info->flags &
IEEE80211_TX_STAT_ACK);
if (ampdu || (info->flags & IEEE80211_TX_CTL_AMPDU))
info->flags |= IEEE80211_TX_STAT_AMPDU | IEEE80211_TX_CTL_AMPDU;
count = sta->ampdu_tx_count;
sta->ampdu_count = 0;
sta->ampdu_acked = 0;
sta->ampdu_tx_count = 0;
if (fixed_rate && !probe) {
info->status.rates[0].count = count;
goto out;
-4
View File
@@ -79,10 +79,6 @@ struct mt7603_sta {
u8 rate_probe;
u8 ampdu_count;
u8 ampdu_tx_count;
u8 ampdu_acked;
u8 ps;
};