mirror of
				https://github.com/Telecominfraproject/wlan-ap.git
				synced 2025-10-31 18:38:10 +00:00 
			
		
		
		
	| @@ -1,22 +1,36 @@ | ||||
| From 2ea2419a492d7473a5cf84818bf4605885e91840 Mon Sep 17 00:00:00 2001 | ||||
| From 582f97930044e786ea30dab8fd200849ce392bf3 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 | ||||
| Subject: [PATCH] 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(-) | ||||
|  package/utils/ucode/Makefile                  | 13 +++- | ||||
|  .../ucode/patches/000-nl80211_copy.patch      | 11 ++++ | ||||
|  package/utils/ucode/patches/0001-fixes.patch  | 59 +++++++++++++++++++ | ||||
|  3 files changed, 82 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 | ||||
| index e2fe4c8bad..4bdd955832 100644 | ||||
| --- a/package/utils/ucode/Makefile | ||||
| +++ b/package/utils/ucode/Makefile | ||||
| @@ -96,7 +96,7 @@ endef | ||||
| @@ -37,6 +37,13 @@ CMAKE_HOST_OPTIONS += \ | ||||
|  	-DUCI_SUPPORT=OFF \ | ||||
|  	-DULOOP_SUPPORT=OFF | ||||
|   | ||||
| +ifeq ($(CONFIG_TARGET_ipq95xx),y) | ||||
| +TARGET_CFLAGS += -DQCA_WIFI_7 | ||||
| +endif | ||||
| + | ||||
| +ifeq ($(CONFIG_TARGET_ipq807x)$(CONFIG_TARGET_ipq60xx)$(CONFIG_TARGET_ipq50xx),y) | ||||
| +TARGET_CFLAGS += -DQCA_v4_4 | ||||
| +endif | ||||
|   | ||||
|  define Package/ucode/default | ||||
|    SUBMENU:=ucode | ||||
| @@ -96,7 +103,7 @@ endef | ||||
|  define Package/ucode-mod-nl80211 | ||||
|    $(Package/ucode/default) | ||||
|    TITLE+= (nl80211 module) | ||||
| @@ -25,7 +39,7 @@ index e768acbae9..e3a33410c2 100644 | ||||
|  endef | ||||
|   | ||||
|  define Package/ucode-mod-nl80211/description | ||||
| @@ -171,6 +171,10 @@ define Package/ucode-mod-uloop/description | ||||
| @@ -171,6 +178,10 @@ define Package/ucode-mod-uloop/description | ||||
|   loop implementation. | ||||
|  endef | ||||
|   | ||||
| @@ -55,10 +69,10 @@ index 0000000000..ff20e3e7e2 | ||||
| +  | ||||
| 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 | ||||
| index 0000000000..a8f96fc71d | ||||
| --- /dev/null | ||||
| +++ b/package/utils/ucode/patches/0001-fixes.patch | ||||
| @@ -0,0 +1,100 @@ | ||||
| @@ -0,0 +1,59 @@ | ||||
| +From 25df1c3e41f274f70e4fbf5fdc10e4290ba019f5 Mon Sep 17 00:00:00 2001 | ||||
| +From: John Crispin <john@phrozen.org> | ||||
| +Date: Thu, 20 Jan 2022 10:48:35 +0100 | ||||
| @@ -69,96 +83,55 @@ index 0000000000..8ef37ecf1c | ||||
| + 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. | ||||
| +Index: ucode-2023-06-06-c7d84aae/lib/nl80211.c | ||||
| +=================================================================== | ||||
| +--- ucode-2023-06-06-c7d84aae.orig/lib/nl80211.c | ||||
| ++++ ucode-2023-06-06-c7d84aae/lib/nl80211.c | ||||
| +@@ -56,6 +56,26 @@ limitations under the License. | ||||
| +  | ||||
| + #define NL80211_CMDS_BITMAP_SIZE	DIV_ROUND_UP(NL80211_CMD_MAX + 1, 32) | ||||
| +  | ||||
| ++#define NL80211_ATTR_NOT_IMPLEMENTED 0x10000 | ||||
| ++#ifdef QCA_v4_4 | ||||
| ++#define NL80211_STA_INFO_CONNECTED_TO_AS NL80211_ATTR_NOT_IMPLEMENTED | ||||
| ++#define NL80211_BAND_IFTYPE_ATTR_VENDOR_ELEMS NL80211_ATTR_NOT_IMPLEMENTED | ||||
| ++#define NL80211_FREQUENCY_ATTR_1MHZ NL80211_ATTR_NOT_IMPLEMENTED | ||||
| ++#define NL80211_FREQUENCY_ATTR_2MHZ NL80211_ATTR_NOT_IMPLEMENTED | ||||
| ++#define NL80211_FREQUENCY_ATTR_4MHZ NL80211_ATTR_NOT_IMPLEMENTED | ||||
| ++#define NL80211_FREQUENCY_ATTR_8MHZ NL80211_ATTR_NOT_IMPLEMENTED | ||||
| ++#define NL80211_FREQUENCY_ATTR_16MHZ NL80211_ATTR_NOT_IMPLEMENTED | ||||
| ++#define NL80211_PMSR_FTM_REQ_ATTR_LMR_FEEDBACK NL80211_ATTR_NOT_IMPLEMENTED | ||||
| ++#define NL80211_PMSR_FTM_REQ_ATTR_BSS_COLOR NL80211_ATTR_NOT_IMPLEMENTED | ||||
| ++#define NL80211_MESHCONF_NOLEARN NL80211_ATTR_NOT_IMPLEMENTED | ||||
| ++#define NL80211_MESHCONF_CONNECTED_TO_AS NL80211_ATTR_NOT_IMPLEMENTED | ||||
| ++#endif | ||||
| ++ | ||||
| ++#ifndef QCA_WIFI_7 | ||||
| ++#define NL80211_BAND_IFTYPE_ATTR_EHT_CAP_MAC NL80211_ATTR_NOT_IMPLEMENTED | ||||
| ++#define NL80211_BAND_IFTYPE_ATTR_EHT_CAP_PHY NL80211_ATTR_NOT_IMPLEMENTED | ||||
| ++#endif | ||||
| ++ | ||||
| ++ | ||||
| + static struct { | ||||
| + 	int code; | ||||
| + 	char *msg; | ||||
| +@@ -277,6 +279,14 @@ static const uc_nl_nested_spec_t nl80211 | ||||
| + 	} | ||||
| + }; | ||||
| +@@ -560,7 +580,7 @@ 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 | ||||
| +-	.nattrs = 7, | ||||
| ++	.nattrs = 9, | ||||
| + 	.attrs = { | ||||
| + 		{ NL80211_BAND_IFTYPE_ATTR_IFTYPES, "iftypes", DT_NESTED, 0, &nl80211_ifcomb_limit_types_nla }, | ||||
| + 		{ NL80211_BAND_IFTYPE_ATTR_HE_CAP_MAC, "he_cap_mac", DT_U16, DF_ARRAY, NULL }, | ||||
| +@@ -569,6 +589,8 @@ static const uc_nl_nested_spec_t nl80211 | ||||
| + 		{ NL80211_BAND_IFTYPE_ATTR_HE_CAP_PPE, "he_cap_ppe", DT_U8, DF_ARRAY, NULL }, | ||||
| + 		{ NL80211_BAND_IFTYPE_ATTR_HE_6GHZ_CAPA, "he_6ghz_capa", DT_U16, 0, NULL }, | ||||
| + 		{ NL80211_BAND_IFTYPE_ATTR_VENDOR_ELEMS, "vendor_elems", DT_STRING, DF_BINARY, NULL }, | ||||
| ++		{ NL80211_BAND_IFTYPE_ATTR_EHT_CAP_MAC, "eht_cap_mac", DT_U16, DF_ARRAY, NULL }, | ||||
| ++		{ NL80211_BAND_IFTYPE_ATTR_EHT_CAP_PHY, "eht_cap_phy", DT_U16, DF_ARRAY, NULL }, | ||||
| + 	} | ||||
| + }; | ||||
| +  | ||||
| ++#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 | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 John Crispin
					John Crispin