Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/esp-hosted: fix build failure with Linux >= 7.3.0
@ 2026-11-02 14:37 Giulio Benetti
  2026-11-02 14:39 ` Giulio Benetti
  2026-11-04 21:54 ` Thomas Petazzoni via buildroot
  0 siblings, 2 replies; 3+ messages in thread
From: Giulio Benetti @ 2026-11-02 14:37 UTC (permalink / raw)
  To: buildroot; +Cc: Giulio Benetti

Espressif moved esp-hosted NG driver to a separate repository so let's
point ESP_HOSTED_SITE accordingly(esp-hosted-linux) taking into account
the slight difference of folder structure.
Let's also bump to latest version 2026-11-01 and drop local patch that has
been applied to master branch.
So let's add local patch pending upstream to fix build failure with Linux
7.3.0.

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
---
 ...p_hosted_ng-Fix-build-for-kernel-7.1.patch | 147 ------------------
 ...p_hosted_ng-Fix-build-for-kernel-7.3.patch |  86 ++++++++++
 package/esp-hosted/esp-hosted.hash            |   2 +-
 package/esp-hosted/esp-hosted.mk              |   8 +-
 4 files changed, 91 insertions(+), 152 deletions(-)
 delete mode 100644 package/esp-hosted/0001-fix-esp_hosted_ng-Fix-build-for-kernel-7.1.patch
 create mode 100644 package/esp-hosted/0001-fix-esp_hosted_ng-Fix-build-for-kernel-7.3.patch

diff --git a/package/esp-hosted/0001-fix-esp_hosted_ng-Fix-build-for-kernel-7.1.patch b/package/esp-hosted/0001-fix-esp_hosted_ng-Fix-build-for-kernel-7.1.patch
deleted file mode 100644
index 90076b4956..0000000000
--- a/package/esp-hosted/0001-fix-esp_hosted_ng-Fix-build-for-kernel-7.1.patch
+++ /dev/null
@@ -1,147 +0,0 @@
-From fa27d70495e3b4f92c9de43b33aa09813a318495 Mon Sep 17 00:00:00 2001
-From: Giulio Benetti <giulio.benetti@benettiengineering.com>
-Date: Mon, 18 May 2026 16:44:57 +0200
-Subject: [PATCH] fix(esp_hosted_ng): Fix build for kernel 7.1
-
-With commit:
-https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=033fe322f5852d5144a85978e880e01b1787fd0d
-many functions esp_cfg80211_*() have argument struct netdevice * subsituted
-with struct wireless_dev *. So let's add separate function headers and
-retrieve struct netdev * from struct wireless_dev * if Linux version >= 7.1.
-
-Upstream: https://github.com/espressif/esp-hosted/pull/736
-Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
----
- esp_hosted_ng/host/esp_cfg80211.c | 50 +++++++++++++++++++++++++++++++
- 1 file changed, 50 insertions(+)
-
-diff --git a/esp_hosted_ng/host/esp_cfg80211.c b/esp_hosted_ng/host/esp_cfg80211.c
-index c68f7983e6..1009df1fd5 100644
---- a/esp_hosted_ng/host/esp_cfg80211.c
-+++ b/esp_hosted_ng/host/esp_cfg80211.c
-@@ -533,22 +533,38 @@ static int esp_cfg80211_set_default_key(struct wiphy *wiphy,
- }
- 
- static int esp_cfg80211_set_default_mgmt_key(struct wiphy *wiphy,
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(7, 1, 0))
-+					     struct wireless_dev *wdev, INT_LINK_ID u8 key_index)
-+#else
- 					     struct net_device *ndev, INT_LINK_ID u8 key_index)
-+#endif
- {
- 	return 0;
- }
- 
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(7, 1, 0))
-+static int esp_cfg80211_del_key(struct wiphy *wiphy, struct wireless_dev *wdev,
-+#else
- static int esp_cfg80211_del_key(struct wiphy *wiphy, struct net_device *dev,
-+#endif
- 				INT_LINK_ID u8 key_index, bool pairwise,
- 				const u8 *mac_addr)
- {
- 	return 0;
- }
- 
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(7, 1, 0))
-+static int esp_cfg80211_add_key(struct wiphy *wiphy, struct wireless_dev *wdev,
-+				INT_LINK_ID u8 key_index, bool pairwise,
-+				const u8 *mac_addr, struct key_params *params)
-+{
-+	struct net_device *dev = wdev->netdev;
-+#else
- static int esp_cfg80211_add_key(struct wiphy *wiphy, struct net_device *dev,
- 				INT_LINK_ID u8 key_index, bool pairwise,
- 				const u8 *mac_addr, struct key_params *params)
- {
-+#endif
- 	struct esp_wifi_device *priv = NULL;
- 
- 	if (!wiphy || !dev || !params) {
-@@ -564,7 +580,11 @@ static int esp_cfg80211_add_key(struct wiphy *wiphy, struct net_device *dev,
- 	esp_dbg("\n");
- 
- 	if (params->key_len == 0) {
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(7, 1, 0))
-+		return esp_cfg80211_del_key(wiphy, wdev, ZERO_LINK_ID key_index, pairwise, mac_addr);
-+#else
- 		return esp_cfg80211_del_key(wiphy, dev, ZERO_LINK_ID key_index, pairwise, mac_addr);
-+#endif
- 	}
- 	return cmd_add_key(priv, key_index, pairwise, mac_addr, params);
- }
-@@ -783,9 +803,16 @@ static int esp_cfg80211_set_tx_power(struct wiphy *wiphy,
- 	return cmd_set_tx_power(priv, priv->tx_pwr);
- }
- 
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(7, 1, 0))
-+static int esp_cfg80211_get_station(struct wiphy *wiphy, struct wireless_dev *wdev,
-+				    const u8 *mac, struct station_info *sinfo)
-+{
-+	struct net_device *ndev = wdev->netdev;
-+#else
- static int esp_cfg80211_get_station(struct wiphy *wiphy, struct net_device *ndev,
- 				    const u8 *mac, struct station_info *sinfo)
- {
-+#endif
- 	struct esp_wifi_device *priv = NULL;
- 
- 	priv = netdev_priv(ndev);
-@@ -1034,9 +1061,16 @@ static int esp_cfg80211_probe_client(struct wiphy *wiphy, struct net_device *dev
- 	return 0;
- }
- 
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(7, 1, 0))
-+static int esp_cfg80211_del_station(struct wiphy *wiphy, struct wireless_dev *wdev,
-+					struct station_del_parameters *params)
-+{
-+	struct net_device *dev = wdev->netdev;
-+#else
- static int esp_cfg80211_del_station(struct wiphy *wiphy, struct net_device *dev,
- 					struct station_del_parameters *params)
- {
-+#endif
- 	struct esp_wifi_device *priv = NULL;
- 
- 	if (!wiphy || !dev) {
-@@ -1055,10 +1089,18 @@ static int esp_cfg80211_del_station(struct wiphy *wiphy, struct net_device *dev,
- 	return 0;
- }
- 
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(7, 1, 0))
-+static int esp_cfg80211_add_station(struct wiphy *wiphy, struct wireless_dev *wdev,
-+				    const u8 *mac,
-+				    struct station_parameters *params)
-+{
-+	struct net_device *dev = wdev->netdev;
-+#else
- static int esp_cfg80211_add_station(struct wiphy *wiphy, struct net_device *dev,
- 				    const u8 *mac,
- 				    struct station_parameters *params)
- {
-+#endif
- 	struct esp_wifi_device *priv = NULL;
- 
- 	if (!wiphy || !dev) {
-@@ -1078,10 +1120,18 @@ static int esp_cfg80211_add_station(struct wiphy *wiphy, struct net_device *dev,
- 	return 0;
- }
- 
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(7, 1, 0))
-+static int esp_cfg80211_change_station(struct wiphy *wiphy,
-+				       struct wireless_dev *wdev, const u8 *mac,
-+				       struct station_parameters *params)
-+{
-+	struct net_device *dev = wdev->netdev;
-+#else
- static int esp_cfg80211_change_station(struct wiphy *wiphy,
- 				       struct net_device *dev, const u8 *mac,
- 				       struct station_parameters *params)
- {
-+#endif
- 	struct esp_wifi_device *priv = NULL;
- 
- 	if (!wiphy || !dev) {
--- 
-2.47.3
-
diff --git a/package/esp-hosted/0001-fix-esp_hosted_ng-Fix-build-for-kernel-7.3.patch b/package/esp-hosted/0001-fix-esp_hosted_ng-Fix-build-for-kernel-7.3.patch
new file mode 100644
index 0000000000..3614f65b16
--- /dev/null
+++ b/package/esp-hosted/0001-fix-esp_hosted_ng-Fix-build-for-kernel-7.3.patch
@@ -0,0 +1,86 @@
+From f91cb6274e5b13342091a934fadeeb39ea9613d0 Mon Sep 17 00:00:00 2001
+From: Giulio Benetti <giulio.benetti@benettiengineering.com>
+Date: Thu, 29 Oct 2026 12:46:52 +0100
+Subject: [PATCH] fix(esp_hosted_ng): Fix build for kernel 7.3
+
+With commit:
+https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=914781c72813989b512609a51f8abb68417f722d
+argument u64 *cookie changed into u64 cookie for mgmt_tx callback.
+So let's deal with it when Linux version >= 7.3.0.
+
+With commit:
+https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4ab9b637b94a
+probe_client callback has been renamed to probe_peer.
+So let's disable probe_client when Linux version >= 7.3.0.
+
+Upstream: https://github.com/espressif/esp-hosted-linux/pull/6
+Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
+---
+ host/esp_cfg80211.c | 22 ++++++++++++++++++++--
+ 1 file changed, 20 insertions(+), 2 deletions(-)
+
+diff --git a/host/esp_cfg80211.c b/host/esp_cfg80211.c
+index 2edd523..ff61de5 100644
+--- a/host/esp_cfg80211.c
++++ b/host/esp_cfg80211.c
+@@ -1190,7 +1190,12 @@ static int esp_cfg80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
+ #else
+ 				struct cfg80211_mgmt_tx_params *params,
+ #endif
+-		u64 *cookie)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(7, 3, 0)
++				u64 cookie
++#else
++				u64 *cookie
++#endif
++)
+ {
+ 	struct esp_wifi_device *priv = NULL;
+ 
+@@ -1207,8 +1212,11 @@ static int esp_cfg80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
+ 		esp_err("empty priv\n");
+ 		return -EINVAL;
+ 	}
+-
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(7, 3, 0)
++	return cmd_mgmt_request(priv, params, &cookie);
++#else
+ 	return cmd_mgmt_request(priv, params, cookie);
++#endif
+ }
+ 
+ static int esp_cfg80211_set_ap_chanwidth(struct wiphy *wiphy,
+@@ -2444,12 +2452,18 @@ static void esp_cfg80211_mgmt_frame_registrations(struct wiphy *wiphy,
+ }
+ #endif
+ 
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(7, 3, 0))
++static int esp_cfg80211_probe_peer(struct wiphy *wiphy, struct net_device *dev,
++                                  const u8 *peer, u64 cookie)
++#else
+ static int esp_cfg80211_probe_client(struct wiphy *wiphy, struct net_device *dev,
+                                   const u8 *peer, u64 *cookie)
++#endif
+ {
+ 	return -EOPNOTSUPP;
+ }
+ 
++
+ #if (LINUX_VERSION_CODE >= KERNEL_VERSION(7, 1, 0))
+ static int esp_cfg80211_del_station(struct wiphy *wiphy, struct wireless_dev *wdev,
+ 					struct station_del_parameters *params)
+@@ -2675,7 +2689,11 @@ static struct cfg80211_ops esp_cfg80211_ops = {
+ #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0))
+ 	.update_mgmt_frame_registrations = esp_cfg80211_mgmt_frame_registrations,
+ #endif
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(7, 3, 0))
++	.probe_peer = esp_cfg80211_probe_peer,
++#else
+ 	.probe_client = esp_cfg80211_probe_client,
++#endif
+ 	.del_station = esp_cfg80211_del_station,
+ 	.add_station = esp_cfg80211_add_station,
+ 	.change_station = esp_cfg80211_change_station,
+-- 
+2.47.3
+
diff --git a/package/esp-hosted/esp-hosted.hash b/package/esp-hosted/esp-hosted.hash
index b478d412f4..8b8347ebf4 100644
--- a/package/esp-hosted/esp-hosted.hash
+++ b/package/esp-hosted/esp-hosted.hash
@@ -1,3 +1,3 @@
 # Locally calculated
-sha256  b8baa6d1c8576f5453e382333bc4aafef1293b4705f073dff5b08d900d10d68c  ng-v1.0.6.tar.gz
+sha256  02abcfea2bf8e040d7fb6af19de155d19cf0a7f698dc069639ec0ab5f2dedf4b  ng-v54d53676e36850e53d82ee779b6d65dff8e65967.tar.gz
 sha256  f6b78c087c3ebdf0f3c13415070dd480a3f35d8fc76f3d02180a407c1c812f79  esp_hosted_ng/host/LICENSE
diff --git a/package/esp-hosted/esp-hosted.mk b/package/esp-hosted/esp-hosted.mk
index 5cf6571481..8a9140d07a 100644
--- a/package/esp-hosted/esp-hosted.mk
+++ b/package/esp-hosted/esp-hosted.mk
@@ -4,13 +4,13 @@
 #
 ################################################################################
 
-ESP_HOSTED_VERSION = 1.0.6
-ESP_HOSTED_SITE = $(call github,espressif,esp-hosted,release/ng-$(ESP_HOSTED_VERSION))
+ESP_HOSTED_VERSION = 54d53676e36850e53d82ee779b6d65dff8e65967
+ESP_HOSTED_SITE = $(call github,espressif,esp-hosted-linux,$(ESP_HOSTED_VERSION))
 ESP_HOSTED_SOURCE = ng-v$(ESP_HOSTED_VERSION).tar.gz
 ESP_HOSTED_DEPENDENCIES = linux
 ESP_HOSTED_LICENSE = GPL-2.0
-ESP_HOSTED_LICENSE_FILES = esp_hosted_ng/host/LICENSE
-ESP_HOSTED_MODULE_SUBDIRS = esp_hosted_ng/host
+ESP_HOSTED_LICENSE_FILES = host/LICENSE
+ESP_HOSTED_MODULE_SUBDIRS = host
 
 define ESP_HOSTED_LINUX_CONFIG_FIXUPS
 	$(call KCONFIG_ENABLE_OPT,CONFIG_NET)
-- 
2.47.3

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2026-11-04 21:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-02 14:37 [Buildroot] [PATCH] package/esp-hosted: fix build failure with Linux >= 7.3.0 Giulio Benetti
2026-11-02 14:39 ` Giulio Benetti
2026-11-04 21:54 ` Thomas Petazzoni via buildroot

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