diff mbox series

cfg80211: fix sband iftype data lookup for AP_VLAN

Message ID 20230622160501.40666-1-nbd@nbd.name
State New
Headers show
Series cfg80211: fix sband iftype data lookup for AP_VLAN | expand

Commit Message

Felix Fietkau June 22, 2023, 4:05 p.m. UTC
Since AP_VLAN interfaces are not pushed to the driver, the driver should not
be expected to register iftype data for them.
Map them to the regular AP iftype on lookup.

Fixes: c4cbaf7973a7 ("cfg80211: Add support for HE")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
 include/net/cfg80211.h | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 7c7d03aa9d06..d6fa7c8767ad 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -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];