* [Buildroot] [PATCH] package/wilc-driver: fix build failure with Linux 6.10
@ 2025-04-17 17:13 Giulio Benetti
2025-04-19 14:34 ` Thomas Petazzoni via buildroot
2025-05-02 10:36 ` Arnout Vandecappelle via buildroot
0 siblings, 2 replies; 3+ messages in thread
From: Giulio Benetti @ 2025-04-17 17:13 UTC (permalink / raw)
To: buildroot; +Cc: Giulio Benetti, Kris Bahnsen
Add local patches pending upstream to fix 3 different API changes
throughout Linux 6.7, 6.8, 6.10.
Fixes:
https://autobuild.buildroot.org/results/e001f70dab4c9cebdbde0443f4f8bb6b42ae5561/
Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
---
.../0008-Fix-build-with-Linux-6.7.patch | 46 ++++++++++++++++
.../0009-Fix-build-with-Linux-6.8.patch | 34 ++++++++++++
.../0010-Fix-build-with-Linux-6.10.patch | 55 +++++++++++++++++++
3 files changed, 135 insertions(+)
create mode 100644 package/wilc-driver/0008-Fix-build-with-Linux-6.7.patch
create mode 100644 package/wilc-driver/0009-Fix-build-with-Linux-6.8.patch
create mode 100644 package/wilc-driver/0010-Fix-build-with-Linux-6.10.patch
diff --git a/package/wilc-driver/0008-Fix-build-with-Linux-6.7.patch b/package/wilc-driver/0008-Fix-build-with-Linux-6.7.patch
new file mode 100644
index 0000000000..9714a828eb
--- /dev/null
+++ b/package/wilc-driver/0008-Fix-build-with-Linux-6.7.patch
@@ -0,0 +1,46 @@
+From c2024eb93f6d7ec605226d5d8a29ea17fbc71b5d Mon Sep 17 00:00:00 2001
+From: Giulio Benetti <giulio.benetti@benettiengineering.com>
+Date: Thu, 17 Apr 2025 19:06:48 +0200
+Subject: [PATCH] Fix build with Linux 6.7
+
+During commit:
+https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bb55441c57ccc5cc2eab44e1a97698b9d708871d
+struct cfg80211_ap_settings has been split into multiple structs including
+beacon. So is Linux version is 6.7+ let's use &info->beacon in place of
+beacon.
+
+Upstream: https://github.com/embeddedTS/wilc3000-external-module/pull/8
+Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
+---
+ cfg80211.c | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/cfg80211.c b/cfg80211.c
+index 5c92062..25da3a1 100644
+--- a/cfg80211.c
++++ b/cfg80211.c
+@@ -1822,13 +1822,21 @@ static int start_ap(struct wiphy *wiphy, struct net_device *dev,
+ }
+
+ static int change_beacon(struct wiphy *wiphy, struct net_device *dev,
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,7,0))
++ struct cfg80211_ap_update *info)
++#else
+ struct cfg80211_beacon_data *beacon)
++#endif
+ {
+ struct wilc_vif *vif = netdev_priv(dev);
+
+ PRINT_INFO(vif->ndev, HOSTAPD_DBG, "Setting beacon\n");
+
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,7,0))
++ return wilc_add_beacon(vif, 0, 0, &info->beacon);
++#else
+ return wilc_add_beacon(vif, 0, 0, beacon);
++#endif
+ }
+
+ static int stop_ap(struct wiphy *wiphy, struct net_device *dev
+--
+2.39.5
+
diff --git a/package/wilc-driver/0009-Fix-build-with-Linux-6.8.patch b/package/wilc-driver/0009-Fix-build-with-Linux-6.8.patch
new file mode 100644
index 0000000000..2bafd53a9a
--- /dev/null
+++ b/package/wilc-driver/0009-Fix-build-with-Linux-6.8.patch
@@ -0,0 +1,34 @@
+From 90e679f1b7caad02e68fa8672be6569eb1b2b76f Mon Sep 17 00:00:00 2001
+From: Giulio Benetti <giulio.benetti@benettiengineering.com>
+Date: Thu, 17 Apr 2025 18:56:55 +0200
+Subject: [PATCH] Fix build with Linux 6.8
+
+With commit:
+https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d26270061ae66b915138af7cd73ca6f8b85e6b44
+strlcpy() has been superseded in favor of strscpy() so let's #define
+strlcpy as strscpy if Linux version 6.8+
+
+Upstream: https://github.com/embeddedTS/wilc3000-external-module/pull/8
+Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
+---
+ mon.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/mon.c b/mon.c
+index 2c9c2d9..20b7e20 100644
+--- a/mon.c
++++ b/mon.c
+@@ -6,6 +6,10 @@
+
+ #include "cfg80211.h"
+
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 8, 0))
++#define strlcpy strscpy
++#endif
++
+ struct wilc_wfi_radiotap_hdr {
+ struct ieee80211_radiotap_header hdr;
+ u8 rate;
+--
+2.39.5
+
diff --git a/package/wilc-driver/0010-Fix-build-with-Linux-6.10.patch b/package/wilc-driver/0010-Fix-build-with-Linux-6.10.patch
new file mode 100644
index 0000000000..08444b06e2
--- /dev/null
+++ b/package/wilc-driver/0010-Fix-build-with-Linux-6.10.patch
@@ -0,0 +1,55 @@
+From 684eb3e40c88ee7a2cd4417a12b9b27a35e86655 Mon Sep 17 00:00:00 2001
+From: Giulio Benetti <giulio.benetti@benettiengineering.com>
+Date: Thu, 17 Apr 2025 18:41:07 +0200
+Subject: [PATCH] Fix build with Linux 6.10
+
+During commit:
+https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9b163e0d330debbf7dcc14b2c3e2dc19a3b50a1d
+is_dma_mapped member has been dropped since it was not used anymore. The
+DMA mapping is done directly in single spi drivers in case it's supported
+so having is_dma_mapped set to 1 lead to code breakage. So we can consider
+it always as 0 and basically guard it if Linux version is 6.10+
+
+Upstream: https://github.com/embeddedTS/wilc3000-external-module/pull/8
+Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
+---
+ spi.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/spi.c b/spi.c
+index f7b43e2..be616f4 100644
+--- a/spi.c
++++ b/spi.c
+@@ -338,7 +338,9 @@ static int wilc_spi_tx(struct wilc *wilc, u8 *b, u32 len)
+ memset(&msg, 0, sizeof(msg));
+ spi_message_init(&msg);
+ msg.spi = spi;
++#if KERNEL_VERSION(6, 10, 0) > LINUX_VERSION_CODE
+ msg.is_dma_mapped = USE_SPI_DMA;
++#endif
+ spi_message_add_tail(&tr, &msg);
+
+ ret = spi_sync(spi, &msg);
+@@ -385,7 +387,9 @@ static int wilc_spi_rx(struct wilc *wilc, u8 *rb, u32 rlen)
+ memset(&msg, 0, sizeof(msg));
+ spi_message_init(&msg);
+ msg.spi = spi;
++#if KERNEL_VERSION(6, 10, 0) > LINUX_VERSION_CODE
+ msg.is_dma_mapped = USE_SPI_DMA;
++#endif
+ spi_message_add_tail(&tr, &msg);
+
+ ret = spi_sync(spi, &msg);
+@@ -427,7 +431,9 @@ static int wilc_spi_tx_rx(struct wilc *wilc, u8 *wb, u8 *rb, u32 rlen)
+ memset(&msg, 0, sizeof(msg));
+ spi_message_init(&msg);
+ msg.spi = spi;
++#if KERNEL_VERSION(6, 10, 0) > LINUX_VERSION_CODE
+ msg.is_dma_mapped = USE_SPI_DMA;
++#endif
+
+ spi_message_add_tail(&tr, &msg);
+ ret = spi_sync(spi, &msg);
+--
+2.39.5
+
--
2.39.5
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH] package/wilc-driver: fix build failure with Linux 6.10
2025-04-17 17:13 [Buildroot] [PATCH] package/wilc-driver: fix build failure with Linux 6.10 Giulio Benetti
@ 2025-04-19 14:34 ` Thomas Petazzoni via buildroot
2025-05-02 10:36 ` Arnout Vandecappelle via buildroot
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni via buildroot @ 2025-04-19 14:34 UTC (permalink / raw)
To: Giulio Benetti; +Cc: buildroot, Kris Bahnsen
On Thu, 17 Apr 2025 19:13:39 +0200
Giulio Benetti <giulio.benetti@benettiengineering.com> wrote:
> Add local patches pending upstream to fix 3 different API changes
> throughout Linux 6.7, 6.8, 6.10.
>
> Fixes:
> https://autobuild.buildroot.org/results/e001f70dab4c9cebdbde0443f4f8bb6b42ae5561/
>
> Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
> ---
> .../0008-Fix-build-with-Linux-6.7.patch | 46 ++++++++++++++++
> .../0009-Fix-build-with-Linux-6.8.patch | 34 ++++++++++++
> .../0010-Fix-build-with-Linux-6.10.patch | 55 +++++++++++++++++++
> 3 files changed, 135 insertions(+)
> create mode 100644 package/wilc-driver/0008-Fix-build-with-Linux-6.7.patch
> create mode 100644 package/wilc-driver/0009-Fix-build-with-Linux-6.8.patch
> create mode 100644 package/wilc-driver/0010-Fix-build-with-Linux-6.10.patch
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH] package/wilc-driver: fix build failure with Linux 6.10
2025-04-17 17:13 [Buildroot] [PATCH] package/wilc-driver: fix build failure with Linux 6.10 Giulio Benetti
2025-04-19 14:34 ` Thomas Petazzoni via buildroot
@ 2025-05-02 10:36 ` Arnout Vandecappelle via buildroot
1 sibling, 0 replies; 3+ messages in thread
From: Arnout Vandecappelle via buildroot @ 2025-05-02 10:36 UTC (permalink / raw)
To: Giulio Benetti, buildroot; +Cc: Kris Bahnsen
On 17/04/2025 19:13, Giulio Benetti wrote:
> Add local patches pending upstream to fix 3 different API changes
> throughout Linux 6.7, 6.8, 6.10.
>
> Fixes:
> https://autobuild.buildroot.org/results/e001f70dab4c9cebdbde0443f4f8bb6b42ae5561/
>
> Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
Applied to 2025.02.x, thanks.
Regards,
Arnout
> ---
> .../0008-Fix-build-with-Linux-6.7.patch | 46 ++++++++++++++++
> .../0009-Fix-build-with-Linux-6.8.patch | 34 ++++++++++++
> .../0010-Fix-build-with-Linux-6.10.patch | 55 +++++++++++++++++++
> 3 files changed, 135 insertions(+)
> create mode 100644 package/wilc-driver/0008-Fix-build-with-Linux-6.7.patch
> create mode 100644 package/wilc-driver/0009-Fix-build-with-Linux-6.8.patch
> create mode 100644 package/wilc-driver/0010-Fix-build-with-Linux-6.10.patch
>
> diff --git a/package/wilc-driver/0008-Fix-build-with-Linux-6.7.patch b/package/wilc-driver/0008-Fix-build-with-Linux-6.7.patch
> new file mode 100644
> index 0000000000..9714a828eb
> --- /dev/null
> +++ b/package/wilc-driver/0008-Fix-build-with-Linux-6.7.patch
> @@ -0,0 +1,46 @@
> +From c2024eb93f6d7ec605226d5d8a29ea17fbc71b5d Mon Sep 17 00:00:00 2001
> +From: Giulio Benetti <giulio.benetti@benettiengineering.com>
> +Date: Thu, 17 Apr 2025 19:06:48 +0200
> +Subject: [PATCH] Fix build with Linux 6.7
> +
> +During commit:
> +https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bb55441c57ccc5cc2eab44e1a97698b9d708871d
> +struct cfg80211_ap_settings has been split into multiple structs including
> +beacon. So is Linux version is 6.7+ let's use &info->beacon in place of
> +beacon.
> +
> +Upstream: https://github.com/embeddedTS/wilc3000-external-module/pull/8
> +Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
> +---
> + cfg80211.c | 8 ++++++++
> + 1 file changed, 8 insertions(+)
> +
> +diff --git a/cfg80211.c b/cfg80211.c
> +index 5c92062..25da3a1 100644
> +--- a/cfg80211.c
> ++++ b/cfg80211.c
> +@@ -1822,13 +1822,21 @@ static int start_ap(struct wiphy *wiphy, struct net_device *dev,
> + }
> +
> + static int change_beacon(struct wiphy *wiphy, struct net_device *dev,
> ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,7,0))
> ++ struct cfg80211_ap_update *info)
> ++#else
> + struct cfg80211_beacon_data *beacon)
> ++#endif
> + {
> + struct wilc_vif *vif = netdev_priv(dev);
> +
> + PRINT_INFO(vif->ndev, HOSTAPD_DBG, "Setting beacon\n");
> +
> ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,7,0))
> ++ return wilc_add_beacon(vif, 0, 0, &info->beacon);
> ++#else
> + return wilc_add_beacon(vif, 0, 0, beacon);
> ++#endif
> + }
> +
> + static int stop_ap(struct wiphy *wiphy, struct net_device *dev
> +--
> +2.39.5
> +
> diff --git a/package/wilc-driver/0009-Fix-build-with-Linux-6.8.patch b/package/wilc-driver/0009-Fix-build-with-Linux-6.8.patch
> new file mode 100644
> index 0000000000..2bafd53a9a
> --- /dev/null
> +++ b/package/wilc-driver/0009-Fix-build-with-Linux-6.8.patch
> @@ -0,0 +1,34 @@
> +From 90e679f1b7caad02e68fa8672be6569eb1b2b76f Mon Sep 17 00:00:00 2001
> +From: Giulio Benetti <giulio.benetti@benettiengineering.com>
> +Date: Thu, 17 Apr 2025 18:56:55 +0200
> +Subject: [PATCH] Fix build with Linux 6.8
> +
> +With commit:
> +https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d26270061ae66b915138af7cd73ca6f8b85e6b44
> +strlcpy() has been superseded in favor of strscpy() so let's #define
> +strlcpy as strscpy if Linux version 6.8+
> +
> +Upstream: https://github.com/embeddedTS/wilc3000-external-module/pull/8
> +Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
> +---
> + mon.c | 4 ++++
> + 1 file changed, 4 insertions(+)
> +
> +diff --git a/mon.c b/mon.c
> +index 2c9c2d9..20b7e20 100644
> +--- a/mon.c
> ++++ b/mon.c
> +@@ -6,6 +6,10 @@
> +
> + #include "cfg80211.h"
> +
> ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 8, 0))
> ++#define strlcpy strscpy
> ++#endif
> ++
> + struct wilc_wfi_radiotap_hdr {
> + struct ieee80211_radiotap_header hdr;
> + u8 rate;
> +--
> +2.39.5
> +
> diff --git a/package/wilc-driver/0010-Fix-build-with-Linux-6.10.patch b/package/wilc-driver/0010-Fix-build-with-Linux-6.10.patch
> new file mode 100644
> index 0000000000..08444b06e2
> --- /dev/null
> +++ b/package/wilc-driver/0010-Fix-build-with-Linux-6.10.patch
> @@ -0,0 +1,55 @@
> +From 684eb3e40c88ee7a2cd4417a12b9b27a35e86655 Mon Sep 17 00:00:00 2001
> +From: Giulio Benetti <giulio.benetti@benettiengineering.com>
> +Date: Thu, 17 Apr 2025 18:41:07 +0200
> +Subject: [PATCH] Fix build with Linux 6.10
> +
> +During commit:
> +https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9b163e0d330debbf7dcc14b2c3e2dc19a3b50a1d
> +is_dma_mapped member has been dropped since it was not used anymore. The
> +DMA mapping is done directly in single spi drivers in case it's supported
> +so having is_dma_mapped set to 1 lead to code breakage. So we can consider
> +it always as 0 and basically guard it if Linux version is 6.10+
> +
> +Upstream: https://github.com/embeddedTS/wilc3000-external-module/pull/8
> +Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
> +---
> + spi.c | 6 ++++++
> + 1 file changed, 6 insertions(+)
> +
> +diff --git a/spi.c b/spi.c
> +index f7b43e2..be616f4 100644
> +--- a/spi.c
> ++++ b/spi.c
> +@@ -338,7 +338,9 @@ static int wilc_spi_tx(struct wilc *wilc, u8 *b, u32 len)
> + memset(&msg, 0, sizeof(msg));
> + spi_message_init(&msg);
> + msg.spi = spi;
> ++#if KERNEL_VERSION(6, 10, 0) > LINUX_VERSION_CODE
> + msg.is_dma_mapped = USE_SPI_DMA;
> ++#endif
> + spi_message_add_tail(&tr, &msg);
> +
> + ret = spi_sync(spi, &msg);
> +@@ -385,7 +387,9 @@ static int wilc_spi_rx(struct wilc *wilc, u8 *rb, u32 rlen)
> + memset(&msg, 0, sizeof(msg));
> + spi_message_init(&msg);
> + msg.spi = spi;
> ++#if KERNEL_VERSION(6, 10, 0) > LINUX_VERSION_CODE
> + msg.is_dma_mapped = USE_SPI_DMA;
> ++#endif
> + spi_message_add_tail(&tr, &msg);
> +
> + ret = spi_sync(spi, &msg);
> +@@ -427,7 +431,9 @@ static int wilc_spi_tx_rx(struct wilc *wilc, u8 *wb, u8 *rb, u32 rlen)
> + memset(&msg, 0, sizeof(msg));
> + spi_message_init(&msg);
> + msg.spi = spi;
> ++#if KERNEL_VERSION(6, 10, 0) > LINUX_VERSION_CODE
> + msg.is_dma_mapped = USE_SPI_DMA;
> ++#endif
> +
> + spi_message_add_tail(&tr, &msg);
> + ret = spi_sync(spi, &msg);
> +--
> +2.39.5
> +
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-05-02 10:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-17 17:13 [Buildroot] [PATCH] package/wilc-driver: fix build failure with Linux 6.10 Giulio Benetti
2025-04-19 14:34 ` Thomas Petazzoni via buildroot
2025-05-02 10:36 ` Arnout Vandecappelle via buildroot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox