linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/7] mt76: mt7603: fix ED/CCA monitoring with single-stream devices
@ 2021-01-14 11:29 Felix Fietkau
  2021-01-14 11:29 ` [PATCH 2/7] mt76: mt7915: ensure that init work completes before starting the device Felix Fietkau
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: Felix Fietkau @ 2021-01-14 11:29 UTC (permalink / raw)
  To: linux-wireless

Do not use the RSSI values of the unavailable chain

Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
 drivers/net/wireless/mediatek/mt76/mt7603/mac.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/mediatek/mt76/mt7603/mac.c b/drivers/net/wireless/mediatek/mt76/mt7603/mac.c
index 7f0e3df3a094..cc4e7bc48294 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7603/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7603/mac.c
@@ -1631,9 +1631,13 @@ mt7603_edcca_check(struct mt7603_dev *dev)
 	if (rssi0 > 128)
 		rssi0 -= 256;
 
-	rssi1 = FIELD_GET(MT_AGC_41_RSSI_1, val);
-	if (rssi1 > 128)
-		rssi1 -= 256;
+	if (dev->mphy.antenna_mask & BIT(1)) {
+		rssi1 = FIELD_GET(MT_AGC_41_RSSI_1, val);
+		if (rssi1 > 128)
+			rssi1 -= 256;
+	} else {
+		rssi1 = rssi0;
+	}
 
 	if (max(rssi0, rssi1) >= -40 &&
 	    dev->ed_strong_signal < MT7603_EDCCA_BLOCK_TH)
-- 
2.28.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-01-27 16:33 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-14 11:29 [PATCH 1/7] mt76: mt7603: fix ED/CCA monitoring with single-stream devices Felix Fietkau
2021-01-14 11:29 ` [PATCH 2/7] mt76: mt7915: ensure that init work completes before starting the device Felix Fietkau
2021-01-14 11:29 ` [PATCH 3/7] mt76: mt7915: do not set DRR group for stations Felix Fietkau
2021-01-14 11:29 ` [PATCH 4/7] mt76: mt7915: rework mcu API Felix Fietkau
2021-01-14 11:29 ` [PATCH 5/7] mt76: mt7915: disable RED support in the WA firmware Felix Fietkau
2021-01-14 11:29 ` [PATCH 6/7] mt76: mt7915: fix eeprom parsing for DBDC Felix Fietkau
2021-01-27 16:32   ` [PATCH v2 " Felix Fietkau
2021-01-14 11:29 ` [PATCH 7/7] mt76: mt7915: fix eeprom DBDC band selection Felix Fietkau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).