9d8b1978b2d653db245f3b93705a14ad69d5f26f
[openwrt/staging/jow.git] / package / kernel / mac80211 / patches / subsys / 337-mac80211-fix-sband-iftype-data-lookup-for-AP_VLAN.patch
1 From: Felix Fietkau <nbd@nbd.name>
2 Date: Thu, 22 Jun 2023 18:02:25 +0200
3 Subject: [PATCH] mac80211: fix sband iftype data lookup for AP_VLAN
4
5 AP_VLAN interfaces are virtual, so doesn't really exist as a type for
6 capabilities. When passed in as a type, AP is the one that's really intended.
7
8 Fixes: c4cbaf7973a7 ("cfg80211: Add support for HE")
9 Signed-off-by: Felix Fietkau <nbd@nbd.name>
10 ---
11
12 --- a/include/net/cfg80211.h
13 +++ b/include/net/cfg80211.h
14 @@ -567,6 +567,9 @@ ieee80211_get_sband_iftype_data(const st
15 if (WARN_ON(iftype >= NL80211_IFTYPE_MAX))
16 return NULL;
17
18 + if (iftype == NL80211_IFTYPE_AP_VLAN)
19 + iftype = NL80211_IFTYPE_AP;
20 +
21 for (i = 0; i < sband->n_iftype_data; i++) {
22 const struct ieee80211_sband_iftype_data *data =
23 &sband->iftype_data[i];
24 --- a/include/net/cfg80211.h
25 +++ b/include/net/cfg80211.h
26 @@ -567,6 +567,9 @@ ieee80211_get_sband_iftype_data(const st
27 if (WARN_ON(iftype >= NL80211_IFTYPE_MAX))
28 return NULL;
29
30 + if (iftype == NL80211_IFTYPE_AP_VLAN)
31 + iftype = NL80211_IFTYPE_AP;
32 +
33 for (i = 0; i < sband->n_iftype_data; i++) {
34 const struct ieee80211_sband_iftype_data *data =
35 &sband->iftype_data[i];