diff --git a/mt7603/mac.c b/mt7603/mac.c index 0c4106a0..10ba250f 100644 --- a/mt7603/mac.c +++ b/mt7603/mac.c @@ -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; diff --git a/mt7603/mt7603.h b/mt7603/mt7603.h index 0e68d7f2..057608f1 100644 --- a/mt7603/mt7603.h +++ b/mt7603/mt7603.h @@ -79,10 +79,6 @@ struct mt7603_sta { u8 rate_probe; - u8 ampdu_count; - u8 ampdu_tx_count; - u8 ampdu_acked; - u8 ps; };