Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH] cfg80211: fix sband iftype data lookup for AP_VLAN
@ 2023-06-22 16:05 Felix Fietkau
  2023-06-22 16:07 ` Johannes Berg
  0 siblings, 1 reply; 6+ messages in thread
From: Felix Fietkau @ 2023-06-22 16:05 UTC (permalink / raw)
  To: linux-wireless; +Cc: johannes

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 --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];
-- 
2.41.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-06-22 16:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-22 16:05 [PATCH] cfg80211: fix sband iftype data lookup for AP_VLAN Felix Fietkau
2023-06-22 16:07 ` Johannes Berg
2023-06-22 16:25   ` Felix Fietkau
2023-06-22 16:41     ` Johannes Berg
2023-06-22 16:50       ` Felix Fietkau
2023-06-22 16:52         ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox