wifi: cfg80211: fix sband iftype data lookup for AP_VLAN
authorFelix Fietkau <nbd@nbd.name>
Thu, 22 Jun 2023 16:59:19 +0000 (18:59 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 8 Aug 2023 11:01:19 +0000 (13:01 +0200)
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")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Link: https://lore.kernel.org/r/20230622165919.46841-1-nbd@nbd.name
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
include/net/cfg80211.h

index 7c7d03aa9d0683a2988e3850af54669cb0f1c619..d6fa7c8767ad33f11926fbc2c1b80895cd7b4200 100644 (file)
@@ -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];