wifi: mt76: fix RCPI chain 3 mask in sta_poll RSSI extraction
Subsystems (3)
v2 cover wifi: mt76: fix RCPI chain 3 mask in sta_poll RSSI extraction
The fourth receive chain RCPI extraction in sta_poll uses GENMASK(31, 14), an 18-bit mask spanning bits 14-31. It should be GENMASK(31, 24), an 8-bit mask for the fourth byte, consistent with the other three chains and with the RCPI3 definitions used elsewhere in the driver.
On devices with fewer than 4 antenna chains the corrupted value is masked out by antenna_mask. On 4-chain devices this produces incorrect ACK signal strength readings.
---
v1 -> v2: Rebased on wireless.git (was mt76-fixes)
Joshua Klinesmith (4):
wifi: mt76: mt7915: fix RCPI chain 3 mask in sta_poll RSSI extraction
wifi: mt76: mt7996: fix RCPI chain 3 mask in sta_poll RSSI extraction
wifi: mt76: mt7921: fix RCPI chain 3 mask in sta_poll RSSI extraction
wifi: mt76: mt7925: fix RCPI chain 3 mask in sta_poll RSSI extraction
drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7921/mac.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7925/mac.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7996/mac.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)
base-commit: ce5cc2702bb63ecd1f2066acb7d6e7d19081618d
Signature · 1 line
2.43.0
PATCH v2 1/4 wifi: mt76: mt7915: fix RCPI chain 3 mask in sta_poll RSSI extraction
The fourth receive chain RCPI uses GENMASK(31, 14), an 18-bit mask spanning bits 14-31. It should be GENMASK(31, 24), an 8-bit mask for the fourth byte, consistent with the other three chains and with the RCPI3 definitions used elsewhere in the driver (MT_PRXV_RCPI3 and MT_TXS7_F0_RCPI_3 both use GENMASK(31, 24)).
On devices with fewer than 4 antenna chains, the corrupted value is masked out by antenna_mask in mt76_rx_signal(). On 4-chain devices, this produces incorrect ACK signal strength readings.
--- drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/mediatek/mt76/mt7915/mac.c +1 -1
@@ -221,7 +221,7 @@ static void mt7915_mac_sta_poll(struct mt7915_dev *dev) rssi[0 ] =to_rssi (GENMASK (7 ,0 ), val); rssi[1 ] =to_rssi (GENMASK (15 ,8 ), val); rssi[2 ] =to_rssi (GENMASK (23 ,16 ), val); - rssi[3 ] =to_rssi (GENMASK (31 ,14 ), val); + rssi[3 ] =to_rssi (GENMASK (31 ,24 ), val); msta->ack_signal =mt76_rx_signal (msta->vif->phy->mt76->antenna_mask, rssi);
Signature · 1 line
2.43.0
PATCH v2 2/4 wifi: mt76: mt7996: fix RCPI chain 3 mask in sta_poll RSSI extraction
In reply to Joshua KlinesmithThe fourth receive chain RCPI uses GENMASK(31, 14), an 18-bit mask spanning bits 14-31. It should be GENMASK(31, 24), an 8-bit mask for the fourth byte, consistent with the other three chains and with the RCPI3 definitions used elsewhere in the driver (MT_PRXV_RCPI3 and MT_TXS7_F0_RCPI_3 both use GENMASK(31, 24)).
On devices with fewer than 4 antenna chains, the corrupted value is masked out by antenna_mask in mt76_rx_signal(). On 4-chain devices, this produces incorrect ACK signal strength readings.
--- drivers/net/wireless/mediatek/mt76/mt7996/mac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/mediatek/mt76/mt7996/mac.c +1 -1
@@ -205,7 +205,7 @@ static void mt7996_mac_sta_poll(struct mt7996_dev *dev) rssi[0 ] =to_rssi (GENMASK (7 ,0 ), val); rssi[1 ] =to_rssi (GENMASK (15 ,8 ), val); rssi[2 ] =to_rssi (GENMASK (23 ,16 ), val); - rssi[3 ] =to_rssi (GENMASK (31 ,14 ), val); + rssi[3 ] =to_rssi (GENMASK (31 ,24 ), val); mlink =rcu_dereference (msta->vif->mt76.link[wcid->link_id]);if (mlink) {
Signature · 1 line
2.43.0
PATCH v2 3/4 wifi: mt76: mt7921: fix RCPI chain 3 mask in sta_poll RSSI extraction
In reply to Joshua KlinesmithThe fourth receive chain RCPI uses GENMASK(31, 14), an 18-bit mask spanning bits 14-31. It should be GENMASK(31, 24), an 8-bit mask for the fourth byte, consistent with the other three chains and with the RCPI3 definitions used elsewhere in the driver (MT_PRXV_RCPI3 and MT_TXS7_F0_RCPI_3 both use GENMASK(31, 24)).
On devices with fewer than 4 antenna chains, the corrupted value is masked out by antenna_mask in mt76_rx_signal(). On 4-chain devices, this produces incorrect ACK signal strength readings.
--- drivers/net/wireless/mediatek/mt76/mt7921/mac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/mediatek/mt76/mt7921/mac.c +1 -1
@@ -155,7 +155,7 @@ static void mt7921_mac_sta_poll(struct mt792x_dev *dev) rssi[0 ] =to_rssi (GENMASK (7 ,0 ), val); rssi[1 ] =to_rssi (GENMASK (15 ,8 ), val); rssi[2 ] =to_rssi (GENMASK (23 ,16 ), val); - rssi[3 ] =to_rssi (GENMASK (31 ,14 ), val); + rssi[3 ] =to_rssi (GENMASK (31 ,24 ), val); mlink->ack_signal =mt76_rx_signal (msta->vif->phy->mt76->antenna_mask, rssi);
Signature · 1 line
2.43.0
PATCH v2 4/4 wifi: mt76: mt7925: fix RCPI chain 3 mask in sta_poll RSSI extraction
In reply to Joshua KlinesmithThe fourth receive chain RCPI uses GENMASK(31, 14), an 18-bit mask spanning bits 14-31. It should be GENMASK(31, 24), an 8-bit mask for the fourth byte, consistent with the other three chains and with the RCPI3 definitions used elsewhere in the driver (MT_PRXV_RCPI3 and MT_TXS7_F0_RCPI_3 both use GENMASK(31, 24)).
On devices with fewer than 4 antenna chains, the corrupted value is masked out by antenna_mask in mt76_rx_signal(). On 4-chain devices, this produces incorrect ACK signal strength readings.
--- drivers/net/wireless/mediatek/mt76/mt7925/mac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/mediatek/mt76/mt7925/mac.c +1 -1
@@ -145,7 +145,7 @@ static void mt7925_mac_sta_poll(struct mt792x_dev *dev) rssi[0 ] =to_rssi (GENMASK (7 ,0 ), val); rssi[1 ] =to_rssi (GENMASK (15 ,8 ), val); rssi[2 ] =to_rssi (GENMASK (23 ,16 ), val); - rssi[3 ] =to_rssi (GENMASK (31 ,14 ), val); + rssi[3 ] =to_rssi (GENMASK (31 ,24 ), val); mlink->ack_signal =mt76_rx_signal (msta->vif->phy->mt76->antenna_mask, rssi);
Signature · 1 line
2.43.0