Skip to contentSkip to conversation

mac80211: fix sband iftype data lookup for AP_VLAN

PATCH New Felix Fietkau 1 participant 1 message Jun 22, 2023 802.11 (including cfg80211/NL80211)

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 mac80211: fix sband iftype data lookup for AP_VLAN

AP_VLAN interfaces are virtual, so doesn't really exist as a type for capabilities. When passed in as a type, AP is the one that's really intended.

Fixes c4cbaf7973a7 ("cfg80211: Add support for HE")
---
 include/net/cfg80211.h | 3 +++
 1 file changed, 3 insertions(+)
include/net/cfg80211.h +3 -0
index 7c7d03aa9d06..d6fa7c8767ad 100644
@@ -562,6 +562,9 @@ ieee80211_get_sband_iftype_data(const struct ieee80211_supported_band *sband,
 	if (WARN_ON(iftype >= NL80211_IFTYPE_MAX))
 		return NULL;
 
+	if (iftype == NL80211_IFTYPE_AP_VLAN)
+		iftype = NL80211_IFTYPE_AP;
+
 	for (i = 0; i < sband->n_iftype_data; i++)  {
 		const struct ieee80211_sband_iftype_data *data =
 			&sband->iftype_data[i];
Signature · 1 line
2.41.0