Files
wlan-ap/patches/0045-ucode-add-TIP-specific-fixes.patch
John Crispin 73d949cf3f 23.05: update patches
Signed-off-by: John Crispin <john@phrozen.org>
2023-09-28 14:50:26 +02:00

165 lines
4.9 KiB
Diff

From 2ea2419a492d7473a5cf84818bf4605885e91840 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Fri, 28 Jul 2023 16:51:13 +0200
Subject: [PATCH 45/45] ucode: add TIP specific fixes
Signed-off-by: John Crispin <john@phrozen.org>
---
package/utils/ucode/Makefile | 6 +-
.../ucode/patches/000-nl80211_copy.patch | 11 ++
package/utils/ucode/patches/0001-fixes.patch | 100 ++++++++++++++++++
3 files changed, 116 insertions(+), 1 deletion(-)
create mode 100644 package/utils/ucode/patches/000-nl80211_copy.patch
create mode 100644 package/utils/ucode/patches/0001-fixes.patch
diff --git a/package/utils/ucode/Makefile b/package/utils/ucode/Makefile
index e768acbae9..e3a33410c2 100644
--- a/package/utils/ucode/Makefile
+++ b/package/utils/ucode/Makefile
@@ -96,7 +96,7 @@ endef
define Package/ucode-mod-nl80211
$(Package/ucode/default)
TITLE+= (nl80211 module)
- DEPENDS:=ucode +libnl-tiny +libubox
+ DEPENDS:=ucode +libnl-tiny +libubox +kmod-mac80211
endef
define Package/ucode-mod-nl80211/description
@@ -171,6 +171,10 @@ define Package/ucode-mod-uloop/description
loop implementation.
endef
+define Build/Prepare
+ $(Build/Prepare/Default)
+ $(CP) $(STAGING_DIR)/usr/include/mac80211/uapi/linux/nl80211.h $(PKG_BUILD_DIR)/nl80211_copy.h
+endef
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/lib $(1)/usr/include/ucode
diff --git a/package/utils/ucode/patches/000-nl80211_copy.patch b/package/utils/ucode/patches/000-nl80211_copy.patch
new file mode 100644
index 0000000000..ff20e3e7e2
--- /dev/null
+++ b/package/utils/ucode/patches/000-nl80211_copy.patch
@@ -0,0 +1,11 @@
+--- a/lib/nl80211.c
++++ b/lib/nl80211.c
+@@ -38,7 +38,7 @@ limitations under the License.
+ #include <netlink/genl/family.h>
+ #include <netlink/genl/ctrl.h>
+
+-#include <linux/nl80211.h>
++#include "../nl80211_copy.h"
+ #include <linux/ieee80211.h>
+ #include <libubox/uloop.h>
+
diff --git a/package/utils/ucode/patches/0001-fixes.patch b/package/utils/ucode/patches/0001-fixes.patch
new file mode 100644
index 0000000000..8ef37ecf1c
--- /dev/null
+++ b/package/utils/ucode/patches/0001-fixes.patch
@@ -0,0 +1,100 @@
+From 25df1c3e41f274f70e4fbf5fdc10e4290ba019f5 Mon Sep 17 00:00:00 2001
+From: John Crispin <john@phrozen.org>
+Date: Thu, 20 Jan 2022 10:48:35 +0100
+Subject: [PATCH] fixes
+
+---
+ lib/nl80211.c | 92 +++++++++++++++++++++++++++++++++++++++++++++++----
+ lib/rtnl.c | 1 +
+ 2 files changed, 87 insertions(+), 6 deletions(-)
+
+--- a/lib/nl80211.c
++++ b/lib/nl80211.c
+@@ -56,6 +56,8 @@ limitations under the License.
+
+ #define NL80211_CMDS_BITMAP_SIZE DIV_ROUND_UP(NL80211_CMD_MAX + 1, 32)
+
++#define NL80211_ATTR_NOT_IMPLEMENTED 0x10000
++
+ static struct {
+ int code;
+ char *msg;
+@@ -277,6 +279,14 @@ static const uc_nl_nested_spec_t nl80211
+ }
+ };
+
++#ifndef NL80211_MESHCONF_NOLEARN
++#define NL80211_MESHCONF_NOLEARN NL80211_ATTR_NOT_IMPLEMENTED
++#endif
++
++#ifndef NL80211_MESHCONF_CONNECTED_TO_AS
++#define NL80211_MESHCONF_CONNECTED_TO_AS NL80211_ATTR_NOT_IMPLEMENTED
++#endif
++
+ static const uc_nl_nested_spec_t nl80211_mesh_params_nla = {
+ .headsize = 0,
+ .nattrs = 29,
+@@ -368,6 +378,14 @@ static const uc_nl_nested_spec_t nl80211
+ }
+ };
+
++#ifndef NL80211_PMSR_FTM_REQ_ATTR_LMR_FEEDBACK
++#define NL80211_PMSR_FTM_REQ_ATTR_LMR_FEEDBACK NL80211_ATTR_NOT_IMPLEMENTED
++#endif
++
++#ifndef NL80211_PMSR_FTM_REQ_ATTR_BSS_COLOR
++#define NL80211_PMSR_FTM_REQ_ATTR_BSS_COLOR NL80211_ATTR_NOT_IMPLEMENTED
++#endif
++
+ static const uc_nl_nested_spec_t nl80211_peer_measurements_peers_req_data_ftm_nla = {
+ .headsize = 0,
+ .nattrs = 13,
+@@ -517,6 +535,26 @@ static const uc_nl_nested_spec_t nl80211
+ }
+ };
+
++#ifndef NL80211_FREQUENCY_ATTR_1MHZ
++#define NL80211_FREQUENCY_ATTR_1MHZ NL80211_ATTR_NOT_IMPLEMENTED
++#endif
++
++#ifndef NL80211_FREQUENCY_ATTR_2MHZ
++#define NL80211_FREQUENCY_ATTR_2MHZ NL80211_ATTR_NOT_IMPLEMENTED
++#endif
++
++#ifndef NL80211_FREQUENCY_ATTR_4MHZ
++#define NL80211_FREQUENCY_ATTR_4MHZ NL80211_ATTR_NOT_IMPLEMENTED
++#endif
++
++#ifndef NL80211_FREQUENCY_ATTR_8MHZ
++#define NL80211_FREQUENCY_ATTR_8MHZ NL80211_ATTR_NOT_IMPLEMENTED
++#endif
++
++#ifndef NL80211_FREQUENCY_ATTR_16MHZ
++#define NL80211_FREQUENCY_ATTR_16MHZ NL80211_ATTR_NOT_IMPLEMENTED
++#endif
++
+ static const uc_nl_nested_spec_t nl80211_wiphy_bands_freqs_nla = {
+ .headsize = 0,
+ .nattrs = 25,
+@@ -558,6 +596,10 @@ static const uc_nl_nested_spec_t nl80211
+ }
+ };
+
++#ifndef NL80211_BAND_IFTYPE_ATTR_VENDOR_ELEMS
++#define NL80211_BAND_IFTYPE_ATTR_VENDOR_ELEMS NL80211_ATTR_NOT_IMPLEMENTED
++#endif
++
+ static const uc_nl_nested_spec_t nl80211_wiphy_bands_iftype_data_nla = {
+ .headsize = 0,
+ .nattrs = 7,
+@@ -728,6 +770,10 @@ static const uc_nl_nested_spec_t nl80211
+ }
+ };
+
++#ifndef NL80211_STA_INFO_CONNECTED_TO_AS
++#define NL80211_STA_INFO_CONNECTED_TO_AS NL80211_ATTR_NOT_IMPLEMENTED
++#endif
++
+ static const uc_nl_nested_spec_t nl80211_sta_info_nla = {
+ .headsize = 0,
+ .nattrs = 40,
--
2.34.1