package/wilc-driver: fix build failure with Linux 6.17
PATCH 1/1 package/wilc-driver: fix build failure with Linux 6.17
Add a local patch pending upstream to fix build failure with Linux 6.17
Signed-off-by Giulio Benetti <[email protected]>
--- .../0015-Fix-build-for-kernel-6.17.patch | 109 ++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 package/wilc-driver/0015-Fix-build-for-kernel-6.17.patch
package/wilc-driver/0015-Fix-build-for-kernel-6.17.patch new file +109 -0
@@ -0,0 +1,109 @@ +From 00895566e07808a0c61d45464797d7cba2eb256c Mon Sep 17 00:00:00 2001 +From: Giulio Benetti <[email protected]> +Date: Fri, 10 Oct 2025 21:58:14 +0200 +Subject: [PATCH] Fix build for kernel 6.17 + +* With commit: +https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b74947b4f6ff7c122a1bb6eb38bb7ecfbb1d3820 +set_wiphy_params(), set/get_tx_power() and set_antenna() gain argument +radio_idx to get radio index. So let's add that argument according to +linux version >= 6.17. +* With commit: +https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a5589313383074c48a1b3751d592a6e084ae0573 +devm_gpio_request() is dropped in favor of devm_gpio_request_one(). +devm_gpio_request_one() requires flags to setup gpio status, but it's +not specified in wilc_of_parse_power_pins() so keep them as GPIOF_IN +since they get defined in wilc_wlan_power() called very soon after +wilc_of_parse_power_pins(). + +Upstream: https://github.com/embeddedTS/wilc3000-external-module/pull/11 +Signed-off-by: Giulio Benetti <[email protected]> +--- + cfg80211.c | 15 +++++++++++++++ + power.c | 12 +++++++++++- + 2 files changed, 26 insertions(+), 1 deletion(-) + +diff --git a/cfg80211.c b/cfg80211.c +index 0e1375c..a7db9e6 100644 +--- a/cfg80211.c ++++ b/cfg80211.c +@@ -997,7 +997,11 @@ static int change_bss(struct wiphy *wiphy, struct net_device *dev, + return 0; + } + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 17, 0)) ++static int set_wiphy_params(struct wiphy *wiphy, int radio_idx, u32 changed) ++#else + static int set_wiphy_params(struct wiphy *wiphy, u32 changed) ++#endif + { + int ret = -EINVAL; + struct cfg_param_attr cfg_param_val; +@@ -2198,6 +2202,9 @@ static void wilc_set_wakeup(struct wiphy *wiphy, bool enabled) + } + + static int set_tx_power(struct wiphy *wiphy, struct wireless_dev *wdev, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 17, 0)) ++ int radio_idx, ++#endif + enum nl80211_tx_power_setting type, int mbm) + { + int ret; +@@ -2230,6 +2237,9 @@ static int set_tx_power(struct wiphy *wiphy, struct wireless_dev *wdev, + } + + static int get_tx_power(struct wiphy *wiphy, struct wireless_dev *wdev, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 17, 0)) ++ int radio_idx, ++#endif + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 14, 0)) + unsigned int link_id, + #endif +@@ -2252,7 +2262,12 @@ static int get_tx_power(struct wiphy *wiphy, struct wireless_dev *wdev, + return ret; + } + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 17, 0)) ++static int set_antenna(struct wiphy *wiphy, int radio_idx, u32 tx_ant, ++ u32 rx_ant) ++#else + static int set_antenna(struct wiphy *wiphy, u32 tx_ant, u32 rx_ant) ++#endif + { + int ret; + struct wilc *wl = wiphy_priv(wiphy); +diff --git a/power.c b/power.c +index 6ab8d63..1cc391d 100644 +--- a/power.c ++++ b/power.c +@@ -1,4 +1,4 @@ +-#include <linux/delay.h> ++#include <linux/delay.h>OA + #include <linux/of.h> + #include <linux/version.h> + #include <linux/of_gpio.h> +@@ -37,11 +37,21 @@ int wilc_of_parse_power_pins(struct wilc *wilc) + !gpio_is_valid(power->gpios.reset)) + return -EINVAL; + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 17, 0)) ++ ret = devm_gpio_request_one(wilc->dev, power->gpios.chip_en, GPIOF_IN, ++ "CHIP_EN"); ++#else + ret = devm_gpio_request(wilc->dev, power->gpios.chip_en, "CHIP_EN"); ++#endif + if (ret) + return ret; + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 17, 0)) ++ ret = devm_gpio_request_one(wilc->dev, power->gpios.reset, GPIOF_IN, ++ "RESET"); ++#else + ret = devm_gpio_request(wilc->dev, power->gpios.reset, "RESET"); ++#endif + return ret; + } + +-- +2.47.3 +
Signature · 6 lines
2.47.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 1/1 package/xr819-xradio: fix build failure with Linux 6.17
Add a local patch pending upstream to fix build failure with Linux 6.17
Signed-off-by Giulio Benetti <[email protected]>
--- .../0001-Fix-build-for-kernel-6.17.patch | 80 +++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 package/xr819-xradio/0001-Fix-build-for-kernel-6.17.patch
package/xr819-xradio/0001-Fix-build-for-kernel-6.17.patch new file +80 -0
@@ -0,0 +1,80 @@ +From dbf3f744650e05a40fc3df6325fc657e5c23cece Mon Sep 17 00:00:00 2001 +From: Giulio Benetti <[email protected]> +Date: Fri, 10 Oct 2025 22:18:12 +0200 +Subject: [PATCH] Fix build for kernel 6.17 + +With commit: +https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b74947b4f6ff7c122a1bb6eb38bb7ecfbb1d3820 +set_rts_threshold() and config() gain argument radio_idx to get radio +index. So let's add that argument according to Linux version >= 6.17. + +Upstream: https://github.com/fifteenhex/xradio/pull/28 +Signed-off-by: Giulio Benetti <[email protected]> +--- + sta.c | 12 ++++++++++-- + sta.h | 12 ++++++++++-- + 2 files changed, 20 insertions(+), 4 deletions(-) + +diff --git a/sta.c b/sta.c +index 1203ce9..d769b81 100644 +--- a/sta.c ++++ b/sta.c +@@ -381,7 +381,11 @@ int xradio_change_interface(struct ieee80211_hw *dev, + return ret; + } + +-int xradio_config(struct ieee80211_hw *dev, u32 changed) ++int xradio_config(struct ieee80211_hw *dev, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 17, 0)) ++ int radio_idx, ++#endif ++ u32 changed) + { + int ret = 0; + struct xradio_common *hw_priv = dev->priv; +@@ -796,7 +800,11 @@ void xradio_wep_key_work(struct work_struct *work) + wsm_unlock_tx(hw_priv); + } + +-int xradio_set_rts_threshold(struct ieee80211_hw *hw, u32 value) ++int xradio_set_rts_threshold(struct ieee80211_hw *hw, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 17, 0)) ++ int radio_idx, ++#endif ++ u32 value) + { + struct xradio_common *hw_priv = hw->priv; + int ret = 0; +diff --git a/sta.h b/sta.h +index 39a023a..de8f837 100644 +--- a/sta.h ++++ b/sta.h +@@ -42,7 +42,11 @@ int xradio_change_interface(struct ieee80211_hw *dev, + struct ieee80211_vif *vif, + enum nl80211_iftype new_type, + bool p2p); +-int xradio_config(struct ieee80211_hw *dev, u32 changed); ++int xradio_config(struct ieee80211_hw *dev, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 17, 0)) ++ int radio_idx, ++#endif ++ u32 changed); + int xradio_change_interface(struct ieee80211_hw *dev, + struct ieee80211_vif *vif, + enum nl80211_iftype new_type, +@@ -65,7 +69,11 @@ int xradio_get_stats(struct ieee80211_hw *dev, + int xradio_get_tx_stats(struct ieee80211_hw *dev, + struct ieee80211_tx_queue_stats *stats); + */ +-int xradio_set_rts_threshold(struct ieee80211_hw *hw, u32 value); ++int xradio_set_rts_threshold(struct ieee80211_hw *hw, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 17, 0)) ++ int radio_idx, ++#endif ++ u32 value); + + void xradio_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif, u32 queues, bool drop); + +-- +2.47.3 +
Signature · 6 lines
2.47.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 3 lines · Giulio Benetti
Add a local patch pending upstream to fix build failure with Linux 6.17
Signed-off-by Giulio Benetti <[email protected]>
Series applied to master, thanks.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot