summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mediatek/mt76/mt7603/mt7603.h
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2019-06-25 00:03:45 +0200
committerFelix Fietkau <nbd@nbd.name>2019-06-27 12:58:13 +0200
commitc5211e997eca0e3fc5c7c9e047ac6b073c3d74f4 (patch)
treef515ebf48c8df004c077f0cc176c9b3047b2ce60 /drivers/net/wireless/mediatek/mt76/mt7603/mt7603.h
parentmt76: mt76x0: fix RF frontend initialization for external PA (diff)
downloadlinux-c5211e997eca0e3fc5c7c9e047ac6b073c3d74f4.tar.xz
linux-c5211e997eca0e3fc5c7c9e047ac6b073c3d74f4.zip
mt76: mt7603: rework and fix tx status reporting
Tx status reporting on mt7603 has a number of issues: - the hardware can alter the first rate index, but it is not reported to the driver - probing is very imprecise, because it alters the per-client rate set, but only considers info->status.rates for rate selection of a single probe packet - short/long GI selection has limitations, which are not accurately reported to mac80211 - if rates are changed while packets are in flight, tx status reports for the old rate set might be processed based on the new selection This led to very suboptimal rate selection with minstrel_ht. This patch completely reworks tx status reporting to get rid of these limitations: - Store the previous and current rate set in the driver + the TSF value at the time of the switch. - Use the tx status TSF value to determine which rate set needs to be used as reference. - Report only short or long GI rates for a single status event, not a mix. - The hardware reports the last used rate index. Use it along with the retry count to figure out what rate was used for the first attempt. - Use the same retry count value for all rate slots to make this calculation work. - Derive the probe rate from the current rateset instead of the skb cb - Do not wait for a status report for the probe frame before removing the probe rate from the rate table. Do it immediately after it was referenced in a tx status report. - Use the first half of the first rate retry budget for the probe rate in order to avoid using too many retries on that rate With this patch, throughput under bad link conditions is improved significantly, and there is a lot less rate fluctuation going on. Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt7603/mt7603.h')
-rw-r--r--drivers/net/wireless/mediatek/mt76/mt7603/mt7603.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt7603/mt7603.h b/drivers/net/wireless/mediatek/mt76/mt7603/mt7603.h
index 944dc9a11a15..60f8269daae7 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7603/mt7603.h
+++ b/drivers/net/wireless/mediatek/mt76/mt7603/mt7603.h
@@ -51,6 +51,11 @@ enum mt7603_bw {
MT_BW_80,
};
+struct mt7603_rate_set {
+ struct ieee80211_tx_rate probe_rate;
+ struct ieee80211_tx_rate rates[4];
+};
+
struct mt7603_sta {
struct mt76_wcid wcid; /* must be first */
@@ -58,7 +63,11 @@ struct mt7603_sta {
struct sk_buff_head psq;
- struct ieee80211_tx_rate rates[8];
+ struct ieee80211_tx_rate rates[4];
+
+ struct mt7603_rate_set rateset[2];
+ u32 rate_set_tsf;
+
u8 rate_count;
u8 n_rates;