package/wilc-driver: fix build failure with Linux 6.10
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> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
committed by
Thomas Petazzoni
parent
f027e7c5b3
commit
3012fbdec7
46
package/wilc-driver/0008-Fix-build-with-Linux-6.7.patch
Normal file
46
package/wilc-driver/0008-Fix-build-with-Linux-6.7.patch
Normal file
@@ -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
|
||||
|
||||
34
package/wilc-driver/0009-Fix-build-with-Linux-6.8.patch
Normal file
34
package/wilc-driver/0009-Fix-build-with-Linux-6.8.patch
Normal file
@@ -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
|
||||
|
||||
55
package/wilc-driver/0010-Fix-build-with-Linux-6.10.patch
Normal file
55
package/wilc-driver/0010-Fix-build-with-Linux-6.10.patch
Normal file
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user