Skip to contentSkip to conversation

mt76: mt7915: fix WMM index on DBDC cards

PATCH In review Felix Fietkau 2 participants 2 messages Sep 8, 2021 – Sep 9, 2021

Subsystems (2)
lore
Share & tools
lore

Felix Fietkau

author maintainer
#0 lore raw

PATCH 1/1 mt76: mt7915: fix WMM index on DBDC cards

WMM index range needs to be split between both PHYs if a second PHY exists. The condition for that was accidentally written as checking if the vif PHY is the secondary one

---
 drivers/net/wireless/mediatek/mt76/mt7915/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/mediatek/mt76/mt7915/main.c +1 -1
index 748ea70ea12e..a19e68668c65 100644
@@ -215,7 +215,7 @@ static int mt7915_add_interface(struct ieee80211_hw *hw,
 	mvif->phy = phy;
 	mvif->band_idx = ext_phy;
 
-	if (ext_phy)
+	if (dev->mt76.phy2)
 		mvif->wmm_idx = ext_phy * (MT7915_MAX_WMM_SETS / 2) +
 				mvif->idx % (MT7915_MAX_WMM_SETS / 2);
 	else
Signature · 1 line
2.30.1
maintainer
#1 lore raw
Quoted 3 lines

WMM index range needs to be split between both PHYs if a second PHY exists. The condition for that was accidentally written as checking if the vif PHY is the secondary one

We need to add the following Fixes tag here:

Fixes e57b7901469fc ("mt76: add mac80211 driver for MT7915 PCIe-based chipsets")

Regards,
Lorenzo

Quoted 22 lines
---
 drivers/net/wireless/mediatek/mt76/mt7915/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/mediatek/mt76/mt7915/main.c +1 -1
index 748ea70ea12e..a19e68668c65 100644
@@ -215,7 +215,7 @@ static int mt7915_add_interface(struct ieee80211_hw *hw,
 	mvif->phy = phy;
 	mvif->band_idx = ext_phy;
 
-	if (ext_phy)
+	if (dev->mt76.phy2)
 		mvif->wmm_idx = ext_phy * (MT7915_MAX_WMM_SETS / 2) +
 				mvif->idx % (MT7915_MAX_WMM_SETS / 2);
 	else
Signature · 1 line
2.30.1