[openwrt/openwrt] ucode: add support for nl80211 vif radio mask

LEDE Commits lede-commits at lists.infradead.org
Tue Oct 22 05:49:07 PDT 2024


nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/5db27664bc1ccbdbf2f80c8517d1b16bcfe6b626

commit 5db27664bc1ccbdbf2f80c8517d1b16bcfe6b626
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Wed Jul 17 16:11:30 2024 +0200

    ucode: add support for nl80211 vif radio mask
    
    Used for multi-radio support
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 .../ucode/patches/100-nl80211_vif_radio_mask.patch | 40 ++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/package/utils/ucode/patches/100-nl80211_vif_radio_mask.patch b/package/utils/ucode/patches/100-nl80211_vif_radio_mask.patch
new file mode 100644
index 0000000000..22e05f7c62
--- /dev/null
+++ b/package/utils/ucode/patches/100-nl80211_vif_radio_mask.patch
@@ -0,0 +1,40 @@
+--- a/include/linux/nl80211.h
++++ b/include/linux/nl80211.h
+@@ -2868,6 +2868,9 @@ enum nl80211_commands {
+  *	nested item, it contains attributes defined in
+  *	&enum nl80211_if_combination_attrs.
+  *
++ * @NL80211_ATTR_VIF_RADIO_MASK: Bitmask of allowed radios (u32).
++ *	A value of 0 means all radios.
++ *
+  * @NUM_NL80211_ATTR: total number of nl80211_attrs available
+  * @NL80211_ATTR_MAX: highest attribute number currently defined
+  * @__NL80211_ATTR_AFTER_LAST: internal use
+@@ -3416,6 +3419,8 @@ enum nl80211_attrs {
+ 	NL80211_ATTR_WIPHY_RADIOS,
+ 	NL80211_ATTR_WIPHY_INTERFACE_COMBINATIONS,
+ 
++	NL80211_ATTR_VIF_RADIO_MASK,
++
+ 	/* add attributes here, update the policy in nl80211.c */
+ 
+ 	__NL80211_ATTR_AFTER_LAST,
+--- a/lib/nl80211.c
++++ b/lib/nl80211.c
+@@ -829,7 +829,7 @@ static const uc_nl_nested_spec_t nl80211
+ 
+ static const uc_nl_nested_spec_t nl80211_msg = {
+ 	.headsize = 0,
+-	.nattrs = 128,
++	.nattrs = 129,
+ 	.attrs = {
+ 		{ NL80211_ATTR_4ADDR, "4addr", DT_U8, 0, NULL },
+ 		{ NL80211_ATTR_AIRTIME_WEIGHT, "airtime_weight", DT_U16, 0, NULL },
+@@ -959,6 +959,7 @@ static const uc_nl_nested_spec_t nl80211
+ 		{ NL80211_ATTR_MAX_AP_ASSOC_STA, "max_ap_assoc", DT_U16, 0, NULL },
+ 		{ NL80211_ATTR_SURVEY_INFO, "survey_info", DT_NESTED, 0, &nl80211_survey_info_nla },
+ 		{ NL80211_ATTR_WIPHY_RADIOS, "radios", DT_NESTED, DF_MULTIPLE|DF_AUTOIDX, &nl80211_wiphy_radio_nla },
++		{ NL80211_ATTR_VIF_RADIO_MASK, "vif_radio_mask", DT_U32, 0, NULL },
+ 	}
+ };
+ 




More information about the lede-commits mailing list