Skip to contentSkip to conversation

mt76: mt7921: use correct iftype data on 6GHz cap init

PATCH In review Shayne Chen 2 participants 2 messages Nov 26, 2021 – Nov 27, 2021

Subsystems (2)
lore
Share & tools
lore

Shayne Chen

author reviewer
#0 lore raw

PATCH 1/1 mt76: mt7921: use correct iftype data on 6GHz cap init

Set 6GHz cap to iftype data which is matched to the type of current interface.

Fixes 50ac15a511e3 ("mt76: mt7921: add 6GHz support")
---
 drivers/net/wireless/mediatek/mt76/mt7921/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/mediatek/mt76/mt7921/main.c +1 -1
index 5a64126..5540b2d 100644
@@ -178,7 +178,7 @@ mt7921_init_he_caps(struct mt7921_phy *phy, enum nl80211_band band,
 			if (vht_cap->cap & IEEE80211_VHT_CAP_RX_ANTENNA_PATTERN)
 				cap |= IEEE80211_HE_6GHZ_CAP_RX_ANTPAT_CONS;
 
-			data->he_6ghz_capa.capa = cpu_to_le16(cap);
+			data[idx].he_6ghz_capa.capa = cpu_to_le16(cap);
 		}
 		idx++;
 	}
Signature · 7 lines
2.25.1


_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek
Acked-by on v1 1/1
#1 lore raw
Quoted 2 lines

Set 6GHz cap to iftype data which is matched to the type of current interface.

In this case data points to data[idx] since mt7921 supports just NL80211_IFTYPE_STATION (please note idx = 0 and idx != i). Anyway this can be an issue in the future when we will add more vif_type. Maybe we can drop Fixes tag, not sure. Anyway:

Quoted 23 lines
Fixes 50ac15a511e3 ("mt76: mt7921: add 6GHz support")
---
 drivers/net/wireless/mediatek/mt76/mt7921/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/mediatek/mt76/mt7921/main.c +1 -1
index 5a64126..5540b2d 100644
@@ -178,7 +178,7 @@ mt7921_init_he_caps(struct mt7921_phy *phy, enum nl80211_band band,
 			if (vht_cap->cap & IEEE80211_VHT_CAP_RX_ANTENNA_PATTERN)
 				cap |= IEEE80211_HE_6GHZ_CAP_RX_ANTPAT_CONS;
 
-			data->he_6ghz_capa.capa = cpu_to_le16(cap);
+			data[idx].he_6ghz_capa.capa = cpu_to_le16(cap);
 		}
 		idx++;
 	}
Signature · 1 line
2.25.1

_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek