2021-07-20 18:27:02

by Ben Greear

[permalink] [raw]
Subject: [PATCH 08/11] mt76: mt7915: Fix SGI reporting when using tx-overrides.

From: Ben Greear <[email protected]>

The station wtbl logic to read rate-ctrl settings does not work when
fixed rates are used. So, read sgi settings from the txo configuration
in this case.

Signed-off-by: Ben Greear <[email protected]>
---
drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 9 +++++++++
1 file changed, 9 insertions(+)

diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mac.c b/drivers/net/wireless/mediatek/mt76/mt7915/mac.c
index 121a3cd33d70..0cacfdf91a11 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/mac.c
@@ -176,6 +176,15 @@ static void mt7915_mac_sta_poll(struct mt7915_dev *dev)
rx_cur);
}

+ /* If we are in tx-override mode, then wtbl doesn't provide useful report
+ * for the SGI/LGI stuff, so just get it from the override struct.
+ */
+ if (msta->test.txo_active) {
+ msta->wcid.rate_he_gi = msta->test.tx_rate_sgi;
+ msta->wcid.rate_short_gi = msta->test.tx_rate_sgi;
+ continue;
+ }
+
/*
* We don't support reading GI info from txs packets.
* For accurate tx status reporting and AQL improvement,
--
2.20.1