[openwrt/openwrt] mac80211: backport ieee80211_set_sband_iftype_data()
LEDE Commits
lede-commits at lists.infradead.org
Fri Apr 26 02:41:39 PDT 2024
rmilecki pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/c69482a91276ce06841ec5b3837c9ef3c27cb30a
commit c69482a91276ce06841ec5b3837c9ef3c27cb30a
Author: Rafał Miłecki <rafal at milecki.pl>
AuthorDate: Fri Apr 19 13:37:22 2024 +0200
mac80211: backport ieee80211_set_sband_iftype_data()
It's needed by some drivers, e.g. mt7925, see:
mt7925/main.c:264:9: error: implicit declaration of function '_ieee80211_set_sband_iftype_data' [-Werror=implicit-function-declaration]
Signed-off-by: Rafał Miłecki <rafal at milecki.pl>
---
...11-add-ieee80211_set_sband_iftype_data-he.patch | 49 ++++++++++++++++++++++
1 file changed, 49 insertions(+)
diff --git a/package/kernel/mac80211/patches/subsys/781-wifi-cfg80211-add-ieee80211_set_sband_iftype_data-he.patch b/package/kernel/mac80211/patches/subsys/781-wifi-cfg80211-add-ieee80211_set_sband_iftype_data-he.patch
new file mode 100644
index 0000000000..c2bfdebb97
--- /dev/null
+++ b/package/kernel/mac80211/patches/subsys/781-wifi-cfg80211-add-ieee80211_set_sband_iftype_data-he.patch
@@ -0,0 +1,49 @@
+From: Johannes Berg <johannes.berg at intel.com>
+Date: Mon, 28 Aug 2023 09:54:39 +0200
+Subject: [PATCH] wifi: cfg80211: add ieee80211_set_sband_iftype_data() helper
+ macro
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Johannes Berg <johannes.berg at intel.com>
+[rmilecki: extract from the e8c1841278a7]
+Signed-off-by: Rafał Miłecki <rafal at milecki.pl>
+---
+
+--- a/include/net/cfg80211.h
++++ b/include/net/cfg80211.h
+@@ -555,6 +555,33 @@ struct ieee80211_supported_band {
+ };
+
+ /**
++ * _ieee80211_set_sband_iftype_data - set sband iftype data array
++ * @sband: the sband to initialize
++ * @iftd: the iftype data array pointer
++ * @n_iftd: the length of the iftype data array
++ *
++ * Set the sband iftype data array; use this where the length cannot
++ * be derived from the ARRAY_SIZE() of the argument, but prefer
++ * ieee80211_set_sband_iftype_data() where it can be used.
++ */
++static inline void
++_ieee80211_set_sband_iftype_data(struct ieee80211_supported_band *sband,
++ const struct ieee80211_sband_iftype_data *iftd,
++ u16 n_iftd)
++{
++ sband->iftype_data = iftd;
++ sband->n_iftype_data = n_iftd;
++}
++
++/**
++ * ieee80211_set_sband_iftype_data - set sband iftype data array
++ * @sband: the sband to initialize
++ * @iftd: the iftype data array
++ */
++#define ieee80211_set_sband_iftype_data(sband, iftd) \
++ _ieee80211_set_sband_iftype_data(sband, iftd, ARRAY_SIZE(iftd))
++
++/**
+ * ieee80211_get_sband_iftype_data - return sband data for a given iftype
+ * @sband: the sband to search for the STA on
+ * @iftype: enum nl80211_iftype
More information about the lede-commits
mailing list