All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/wilc-driver: fix build failure up to Linux 6.1
@ 2022-12-28 20:53 Giulio Benetti
  2022-12-29  8:58 ` Thomas Petazzoni via buildroot
  2023-01-02 19:24 ` Kris Bahnsen via buildroot
  0 siblings, 2 replies; 13+ messages in thread
From: Giulio Benetti @ 2022-12-28 20:53 UTC (permalink / raw)
  To: buildroot; +Cc: Giulio Benetti, Kris Bahnsen

Add patches pending upstream[0] to handle various data types and api
changes up to Linux 6.1.

[0]: https://github.com/embeddedTS/wilc3000-external-module/pull/2

Fixes:
http://autobuild.buildroot.net/results/6aa7475a21a6060e9fce3552f73e6e7100a8b2aa

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
---
 ...missing-prandom_u32-with-Linux-6.1.0.patch |  34 +++
 ...fix-build-failure-on-remove-callback.patch |  44 ++++
 ...uild-failure-with-Linux-5.19-and-6.1.patch |  98 ++++++++
 ...on_parameters-Linux-6.1-build-failur.patch | 216 ++++++++++++++++++
 4 files changed, 392 insertions(+)
 create mode 100644 package/wilc-driver/0001-cfg80211.c-fix-missing-prandom_u32-with-Linux-6.1.0.patch
 create mode 100644 package/wilc-driver/0002-spi.c-fix-build-failure-on-remove-callback.patch
 create mode 100644 package/wilc-driver/0003-cfg80211.c-fix-build-failure-with-Linux-5.19-and-6.1.patch
 create mode 100644 package/wilc-driver/0004-Fix-struct-station_parameters-Linux-6.1-build-failur.patch

diff --git a/package/wilc-driver/0001-cfg80211.c-fix-missing-prandom_u32-with-Linux-6.1.0.patch b/package/wilc-driver/0001-cfg80211.c-fix-missing-prandom_u32-with-Linux-6.1.0.patch
new file mode 100644
index 0000000000..2f10627301
--- /dev/null
+++ b/package/wilc-driver/0001-cfg80211.c-fix-missing-prandom_u32-with-Linux-6.1.0.patch
@@ -0,0 +1,34 @@
+From f80e4343fa0a4d8b22933d1704c85a771fe234a4 Mon Sep 17 00:00:00 2001
+From: Giulio Benetti <giulio.benetti@benettiengineering.com>
+Date: Wed, 28 Dec 2022 19:56:46 +0100
+Subject: [PATCH] cfg80211.c: fix missing prandom_u32() with Linux >= 6.1.0
+
+prandom_u32() previously was only calling get_random_u32() so it's been
+dropped with Linux 6.1.0. So let's directly call get_random_u32() if Linux
+version >= 6.1.0.
+
+[Upstream status: https://github.com/embeddedTS/wilc3000-external-module/pull/2]
+Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
+---
+ cfg80211.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/cfg80211.c b/cfg80211.c
+index 016aa06..41edd02 100644
+--- a/cfg80211.c
++++ b/cfg80211.c
+@@ -1422,7 +1422,11 @@ static int mgmt_tx(struct wiphy *wiphy,
+ 	const u8 *vendor_ie;
+ 	int ret = 0;
+ 
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
++	*cookie = get_random_u32();
++#else
+ 	*cookie = prandom_u32();
++#endif
+ 	priv->tx_cookie = *cookie;
+ 	mgmt = (const struct ieee80211_mgmt *)buf;
+ 
+-- 
+2.34.1
+
diff --git a/package/wilc-driver/0002-spi.c-fix-build-failure-on-remove-callback.patch b/package/wilc-driver/0002-spi.c-fix-build-failure-on-remove-callback.patch
new file mode 100644
index 0000000000..87306dfa12
--- /dev/null
+++ b/package/wilc-driver/0002-spi.c-fix-build-failure-on-remove-callback.patch
@@ -0,0 +1,44 @@
+From a88819bd63f977b5a33d72a2b9e264ce104726bd Mon Sep 17 00:00:00 2001
+From: Giulio Benetti <giulio.benetti@benettiengineering.com>
+Date: Wed, 28 Dec 2022 21:02:12 +0100
+Subject: [PATCH] spi.c: fix build failure on remove callback
+
+Starting from Linux 5.18 remove callback returns void, so let's deal with
+it depending on Linux version >= 5.18.
+
+[Upstream status: https://github.com/embeddedTS/wilc3000-external-module/pull/2]
+Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
+---
+ spi.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/spi.c b/spi.c
+index 96c51fe..f7b43e2 100644
+--- a/spi.c
++++ b/spi.c
+@@ -211,7 +211,11 @@ free:
+ 	return ret;
+ }
+ 
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,18,0))
++static void wilc_bus_remove(struct spi_device *spi)
++#else
+ static int wilc_bus_remove(struct spi_device *spi)
++#endif
+ {
+ 	struct wilc *wilc = spi_get_drvdata(spi);
+ 
+@@ -220,7 +224,10 @@ static int wilc_bus_remove(struct spi_device *spi)
+ 
+ 	wilc_netdev_cleanup(wilc);
+ 	wilc_bt_deinit();
++
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,18,0))
+ 	return 0;
++#endif
+ }
+ 
+ static int wilc_spi_suspend(struct device *dev)
+-- 
+2.34.1
+
diff --git a/package/wilc-driver/0003-cfg80211.c-fix-build-failure-with-Linux-5.19-and-6.1.patch b/package/wilc-driver/0003-cfg80211.c-fix-build-failure-with-Linux-5.19-and-6.1.patch
new file mode 100644
index 0000000000..785b8904b2
--- /dev/null
+++ b/package/wilc-driver/0003-cfg80211.c-fix-build-failure-with-Linux-5.19-and-6.1.patch
@@ -0,0 +1,98 @@
+From a608cdd7903505217529317c04b5b58cb7e25081 Mon Sep 17 00:00:00 2001
+From: Giulio Benetti <giulio.benetti@benettiengineering.com>
+Date: Wed, 28 Dec 2022 21:06:43 +0100
+Subject: [PATCH] cfg80211.c: fix build failure with Linux 5.19 and 6.1
+
+Starting from Linux 5.19 stop_ap() requires unsigned int link_id as
+parameter. Then from Linux 6.1 on lot of other cfg80211 APIs require
+int link_id to deal with MLO, so let's add that parameter too.
+
+[Upstream status: https://github.com/embeddedTS/wilc3000-external-module/pull/2]
+Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
+---
+ cfg80211.c | 35 +++++++++++++++++++++++++++++------
+ 1 file changed, 29 insertions(+), 6 deletions(-)
+
+diff --git a/cfg80211.c b/cfg80211.c
+index 41edd02..57c777d 100644
+--- a/cfg80211.c
++++ b/cfg80211.c
+@@ -674,8 +674,12 @@ static int wilc_wfi_cfg_copy_wpa_info(struct wilc_wfi_key *key_info,
+ 	return 0;
+ }
+ 
+-static int add_key(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
+-		   bool pairwise, const u8 *mac_addr, struct key_params *params)
++static int add_key(struct wiphy *wiphy, struct net_device *netdev,
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,1,0))
++		   int link_id,
++#endif
++		   u8 key_index,  bool pairwise, const u8 *mac_addr,
++		   struct key_params *params)
+ 
+ {
+ 	int ret = 0, keylen = params->key_len, seqlen = params->seq_len;
+@@ -792,6 +796,9 @@ static int add_key(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
+ }
+ 
+ static int del_key(struct wiphy *wiphy, struct net_device *netdev,
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,1,0))
++		   int link_id,
++#endif
+ 		   u8 key_index,
+ 		   bool pairwise,
+ 		   const u8 *mac_addr)
+@@ -833,9 +840,13 @@ static int del_key(struct wiphy *wiphy, struct net_device *netdev,
+ 	return ret;
+ }
+ 
+-static int get_key(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
+-		   bool pairwise, const u8 *mac_addr, void *cookie,
+-		   void (*callback)(void *cookie, struct key_params *))
++static int get_key(struct wiphy *wiphy, struct net_device *netdev,
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,1,0))
++		   int link_id,
++#endif
++		   u8 key_index, bool pairwise, const u8 *mac_addr,
++		   void *cookie, void (*callback)(void *cookie,
++		   struct key_params *))
+ {
+ 	struct wilc_vif *vif = netdev_priv(netdev);
+ 	struct wilc_priv *priv = &vif->priv;
+@@ -877,12 +888,18 @@ static int get_key(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
+ 
+ /* wiphy_new() will WARN if not present*/
+ static int set_default_key(struct wiphy *wiphy, struct net_device *netdev,
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,1,0))
++			   int link_id,
++#endif
+ 			   u8 key_index, bool unicast, bool multicast)
+ {
+ 	return 0;
+ }
+ 
+ static int set_default_mgmt_key (struct wiphy *wiphy,struct net_device *netdev,
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,1,0))
++				 int link_id,
++#endif
+ 				 u8 key_index)
+ {
+     return 0;
+@@ -1814,7 +1831,13 @@ static int change_beacon(struct wiphy *wiphy, struct net_device *dev,
+ 	return wilc_add_beacon(vif, 0, 0, beacon);
+ }
+ 
+-static int stop_ap(struct wiphy *wiphy, struct net_device *dev)
++static int stop_ap(struct wiphy *wiphy, struct net_device *dev
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,19,0))
++		   , unsigned int link_id
++#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(6,1,0))
++		   , int link_id
++#endif
++		  )
+ {
+ 	int ret;
+ 	struct wilc_vif *vif = netdev_priv(dev);
+-- 
+2.34.1
+
diff --git a/package/wilc-driver/0004-Fix-struct-station_parameters-Linux-6.1-build-failur.patch b/package/wilc-driver/0004-Fix-struct-station_parameters-Linux-6.1-build-failur.patch
new file mode 100644
index 0000000000..faee805b5a
--- /dev/null
+++ b/package/wilc-driver/0004-Fix-struct-station_parameters-Linux-6.1-build-failur.patch
@@ -0,0 +1,216 @@
+From 5f022c4d3be32493d500be82f51032ef4fb3cdc0 Mon Sep 17 00:00:00 2001
+From: Giulio Benetti <giulio.benetti@benettiengineering.com>
+Date: Wed, 28 Dec 2022 21:08:45 +0100
+Subject: [PATCH] Fix struct station_parameters Linux 6.1 build failure
+
+Starting from Linux 6.1 struct station_parameters has changed by moving
+some member to its child struct link_station_parameters. Let's extract the
+values of the needed members into local values at the beginning of
+functions and substitute the member access with the local variables.
+
+[Upstream status: https://github.com/embeddedTS/wilc3000-external-module/pull/2]
+Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
+---
+ cfg80211.c | 48 ++++++++++++++++++++++++++++++++----------------
+ hif.c      | 44 ++++++++++++++++++++++++++++++++------------
+ 2 files changed, 64 insertions(+), 28 deletions(-)
+
+diff --git a/cfg80211.c b/cfg80211.c
+index 57c777d..bdd480c 100644
+--- a/cfg80211.c
++++ b/cfg80211.c
+@@ -1866,6 +1866,14 @@ static int add_station(struct wiphy *wiphy, struct net_device *dev,
+ 	struct wilc_vif *vif = netdev_priv(dev);
+ 	struct wilc_priv *priv = &vif->priv;
+ 	u8 *assoc_bss = priv->assoc_stainfo.sta_associated_bss[params->aid];
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
++	struct link_station_parameters *link_sta_params = &params->link_sta_params;
++	const struct ieee80211_ht_cap *ht_capa = link_sta_params->ht_capa;
++	u8 supported_rates_len = link_sta_params->supported_rates_len;
++#else
++	const struct ieee80211_ht_cap *ht_capa = params->ht_capa;
++	u8 supported_rates_len = params->supported_rates_len;
++#endif
+ 
+ 	if (vif->iftype == WILC_AP_MODE || vif->iftype == WILC_GO_MODE) {
+ 		memcpy(assoc_bss, mac, ETH_ALEN);
+@@ -1879,27 +1887,27 @@ static int add_station(struct wiphy *wiphy, struct net_device *dev,
+ 			   params->aid);
+ 		PRINT_INFO(vif->ndev, HOSTAPD_DBG,
+ 			   "Number of supported rates = %d\n",
+-			   params->supported_rates_len);
++			   supported_rates_len);
+ 
+ 		PRINT_INFO(vif->ndev, CFG80211_DBG, "IS HT supported = %d\n",
+-			   (!params->ht_capa) ? false : true);
++			   (!ht_capa) ? false : true);
+ 
+-		if (params->ht_capa) {
++		if (ht_capa) {
+ 			PRINT_INFO(vif->ndev, CFG80211_DBG,
+ 				   "Capability Info = %d\n",
+-				   params->ht_capa->cap_info);
++				   ht_capa->cap_info);
+ 			PRINT_INFO(vif->ndev, CFG80211_DBG,
+ 				   "AMPDU Params = %d\n",
+-				   params->ht_capa->ampdu_params_info);
++				   ht_capa->ampdu_params_info);
+ 			PRINT_INFO(vif->ndev, CFG80211_DBG,
+ 				   "HT Extended params= %d\n",
+-				   params->ht_capa->extended_ht_cap_info);
++				   ht_capa->extended_ht_cap_info);
+ 			PRINT_INFO(vif->ndev, CFG80211_DBG,
+ 				   "Tx Beamforming Cap= %d\n",
+-				   params->ht_capa->tx_BF_cap_info);
++				   ht_capa->tx_BF_cap_info);
+ 			PRINT_INFO(vif->ndev, CFG80211_DBG,
+ 				   "Antenna selection info = %d\n",
+-				   params->ht_capa->antenna_selection_info);
++				   ht_capa->antenna_selection_info);
+ 		}
+ 
+ 		PRINT_INFO(vif->ndev, CFG80211_DBG, "Flag Mask = %d\n",
+@@ -1966,6 +1974,14 @@ static int change_station(struct wiphy *wiphy, struct net_device *dev,
+ {
+ 	int ret = 0;
+ 	struct wilc_vif *vif = netdev_priv(dev);
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
++	struct link_station_parameters *link_sta_params = &params->link_sta_params;
++	const struct ieee80211_ht_cap *ht_capa = link_sta_params->ht_capa;
++	u8 supported_rates_len = link_sta_params->supported_rates_len;
++#else
++	const struct ieee80211_ht_cap *ht_capa = params->ht_capa;
++	u8 supported_rates_len = params->supported_rates_len;
++#endif
+ 
+ 	PRINT_D(vif->ndev, CFG80211_DBG, "Change station parameters\n");
+ 
+@@ -1976,25 +1992,25 @@ static int change_station(struct wiphy *wiphy, struct net_device *dev,
+ 			   params->aid);
+ 		PRINT_INFO(vif->ndev, CFG80211_DBG,
+ 			   "Number of supported rates = %d\n",
+-			   params->supported_rates_len);
++			   supported_rates_len);
+ 		PRINT_INFO(vif->ndev, CFG80211_DBG, "IS HT supported = %d\n",
+-			   (!params->ht_capa) ? false : true);
+-		if (params->ht_capa) {
++			   (!ht_capa) ? false : true);
++		if (ht_capa) {
+ 			PRINT_INFO(vif->ndev, CFG80211_DBG,
+ 				   "Capability Info = %d\n",
+-				   params->ht_capa->cap_info);
++				   ht_capa->cap_info);
+ 			PRINT_INFO(vif->ndev, CFG80211_DBG,
+ 				   "AMPDU Params = %d\n",
+-				   params->ht_capa->ampdu_params_info);
++				   ht_capa->ampdu_params_info);
+ 			PRINT_INFO(vif->ndev, CFG80211_DBG,
+ 				   "HT Extended params= %d\n",
+-				   params->ht_capa->extended_ht_cap_info);
++				   ht_capa->extended_ht_cap_info);
+ 			PRINT_INFO(vif->ndev, CFG80211_DBG,
+ 				   "Tx Beamforming Cap= %d\n",
+-				   params->ht_capa->tx_BF_cap_info);
++				   ht_capa->tx_BF_cap_info);
+ 			PRINT_INFO(vif->ndev, CFG80211_DBG,
+ 				   "Antenna selection info = %d\n",
+-				   params->ht_capa->antenna_selection_info);
++				   ht_capa->antenna_selection_info);
+ 		}
+ 		PRINT_INFO(vif->ndev, CFG80211_DBG, "Flag Mask = %d\n",
+ 			   params->sta_flags_mask);
+diff --git a/hif.c b/hif.c
+index 3f672a0..1a7365b 100644
+--- a/hif.c
++++ b/hif.c
+@@ -2249,6 +2249,16 @@ int wilc_add_station(struct wilc_vif *vif, const u8 *mac,
+ 	int result;
+ 	struct host_if_msg *msg;
+ 	struct add_sta_param *sta_params;
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
++	struct link_station_parameters *link_sta_params = &params->link_sta_params;
++	const struct ieee80211_ht_cap *ht_capa = link_sta_params->ht_capa;
++	u8 supported_rates_len = link_sta_params->supported_rates_len;
++	const u8 *supported_rates = link_sta_params->supported_rates;
++#else
++	const struct ieee80211_ht_cap *ht_capa = params->ht_capa;
++	u8 supported_rates_len = params->supported_rates_len;
++	const u8 *supported_rates = params->supported_rates;
++#endif
+ 
+ 	PRINT_INFO(vif->ndev, HOSTINF_DBG,
+ 		   "Setting adding station message queue params\n");
+@@ -2260,20 +2270,20 @@ int wilc_add_station(struct wilc_vif *vif, const u8 *mac,
+ 	sta_params = &msg->body.add_sta_info;
+ 	memcpy(sta_params->bssid, mac, ETH_ALEN);
+ 	sta_params->aid = params->aid;
+-	if (!params->ht_capa) {
++	if (!ht_capa) {
+ 		sta_params->ht_supported = false;
+ 	} else {
+ 		sta_params->ht_supported = true;
+-		memcpy(&sta_params->ht_capa, params->ht_capa,
++		memcpy(&sta_params->ht_capa, ht_capa,
+ 		       sizeof(struct ieee80211_ht_cap));
+ 	}
+ 	sta_params->flags_mask = params->sta_flags_mask;
+ 	sta_params->flags_set = params->sta_flags_set;
+ 
+-	sta_params->supported_rates_len = params->supported_rates_len;
+-	if (params->supported_rates_len > 0) {
+-		sta_params->supported_rates = kmemdup(params->supported_rates,
+-					    params->supported_rates_len,
++	sta_params->supported_rates_len = supported_rates_len;
++	if (supported_rates_len > 0) {
++		sta_params->supported_rates = kmemdup(supported_rates,
++					    supported_rates_len,
+ 					    GFP_KERNEL);
+ 		if (!sta_params->supported_rates) {
+ 			kfree(msg);
+@@ -2397,6 +2407,16 @@ int wilc_edit_station(struct wilc_vif *vif, const u8 *mac,
+ 	int result;
+ 	struct host_if_msg *msg;
+ 	struct add_sta_param *sta_params;
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
++	struct link_station_parameters *link_sta_params = &params->link_sta_params;
++	const struct ieee80211_ht_cap *ht_capa = link_sta_params->ht_capa;
++	u8 supported_rates_len = link_sta_params->supported_rates_len;
++	const u8 *supported_rates = link_sta_params->supported_rates;
++#else
++	const struct ieee80211_ht_cap *ht_capa = params->ht_capa;
++	u8 supported_rates_len = params->supported_rates_len;
++	const u8 *supported_rates = params->supported_rates;
++#endif
+ 
+ 	PRINT_INFO(vif->ndev, HOSTINF_DBG,
+ 		   "Setting editing station message queue params\n");
+@@ -2408,20 +2428,20 @@ int wilc_edit_station(struct wilc_vif *vif, const u8 *mac,
+ 	sta_params = &msg->body.edit_sta_info;
+ 	memcpy(sta_params->bssid, mac, ETH_ALEN);
+ 	sta_params->aid = params->aid;
+-	if (!params->ht_capa) {
++	if (!ht_capa) {
+ 		sta_params->ht_supported = false;
+ 	} else {
+ 		sta_params->ht_supported = true;
+-		memcpy(&sta_params->ht_capa, params->ht_capa,
++		memcpy(&sta_params->ht_capa, ht_capa,
+ 		       sizeof(struct ieee80211_ht_cap));
+ 	}
+ 	sta_params->flags_mask = params->sta_flags_mask;
+ 	sta_params->flags_set = params->sta_flags_set;
+ 
+-	sta_params->supported_rates_len = params->supported_rates_len;
+-	if (params->supported_rates_len > 0) {
+-		sta_params->supported_rates = kmemdup(params->supported_rates,
+-					    params->supported_rates_len,
++	sta_params->supported_rates_len = supported_rates_len;
++	if (supported_rates_len > 0) {
++		sta_params->supported_rates = kmemdup(supported_rates,
++					    supported_rates_len,
+ 					    GFP_KERNEL);
+ 		if (!sta_params->supported_rates) {
+ 			kfree(msg);
+-- 
+2.34.1
+
-- 
2.34.1

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

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

* Re: [Buildroot] [PATCH] package/wilc-driver: fix build failure up to Linux 6.1
  2022-12-28 20:53 [Buildroot] [PATCH] package/wilc-driver: fix build failure up to Linux 6.1 Giulio Benetti
@ 2022-12-29  8:58 ` Thomas Petazzoni via buildroot
  2022-12-29 22:04   ` Giulio Benetti
  2023-01-02 19:24 ` Kris Bahnsen via buildroot
  1 sibling, 1 reply; 13+ messages in thread
From: Thomas Petazzoni via buildroot @ 2022-12-29  8:58 UTC (permalink / raw)
  To: Giulio Benetti; +Cc: Kris Bahnsen, buildroot

On Wed, 28 Dec 2022 21:53:23 +0100
Giulio Benetti <giulio.benetti@benettiengineering.com> wrote:

> Add patches pending upstream[0] to handle various data types and api
> changes up to Linux 6.1.
> 
> [0]: https://github.com/embeddedTS/wilc3000-external-module/pull/2
> 
> Fixes:
> http://autobuild.buildroot.net/results/6aa7475a21a6060e9fce3552f73e6e7100a8b2aa
> 
> Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
> ---
>  ...missing-prandom_u32-with-Linux-6.1.0.patch |  34 +++
>  ...fix-build-failure-on-remove-callback.patch |  44 ++++
>  ...uild-failure-with-Linux-5.19-and-6.1.patch |  98 ++++++++
>  ...on_parameters-Linux-6.1-build-failur.patch | 216 ++++++++++++++++++
>  4 files changed, 392 insertions(+)
>  create mode 100644 package/wilc-driver/0001-cfg80211.c-fix-missing-prandom_u32-with-Linux-6.1.0.patch
>  create mode 100644 package/wilc-driver/0002-spi.c-fix-build-failure-on-remove-callback.patch
>  create mode 100644 package/wilc-driver/0003-cfg80211.c-fix-build-failure-with-Linux-5.19-and-6.1.patch
>  create mode 100644 package/wilc-driver/0004-Fix-struct-station_parameters-Linux-6.1-build-failur.patch

Applied to master, thanks. However, it is worth mentioning that the
real "upstream" for this driver is the linux4sam Linux tree at
https://github.com/linux4sam/linux-at91. They are currently based on
5.15, but I suppose they will rebase soon on 6.1, so they might be
interested in your fixes. I don't know if/when the out-of-tree variant
of the WILC driver at
https://github.com/embeddedTS/wilc3000-external-module gets synced from
the linux4sam tree.

Best regards,

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] 13+ messages in thread

* Re: [Buildroot] [PATCH] package/wilc-driver: fix build failure up to Linux 6.1
  2022-12-29  8:58 ` Thomas Petazzoni via buildroot
@ 2022-12-29 22:04   ` Giulio Benetti
  2022-12-29 22:06     ` Giulio Benetti
  2023-01-02 22:28     ` Kris Bahnsen via buildroot
  0 siblings, 2 replies; 13+ messages in thread
From: Giulio Benetti @ 2022-12-29 22:04 UTC (permalink / raw)
  To: Thomas Petazzoni; +Cc: Kris Bahnsen, buildroot

Hi Thomas,

> Il giorno 29 dic 2022, alle ore 09:58, Thomas Petazzoni <thomas.petazzoni@bootlin.com> ha scritto:
> 
> On Wed, 28 Dec 2022 21:53:23 +0100
> Giulio Benetti <giulio.benetti@benettiengineering.com> wrote:
> 
>> Add patches pending upstream[0] to handle various data types and api
>> changes up to Linux 6.1.
>> 
>> [0]: https://github.com/embeddedTS/wilc3000-external-module/pull/2
>> 
>> Fixes:
>> http://autobuild.buildroot.net/results/6aa7475a21a6060e9fce3552f73e6e7100a8b2aa
>> 
>> Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
>> ---
>> ...missing-prandom_u32-with-Linux-6.1.0.patch |  34 +++
>> ...fix-build-failure-on-remove-callback.patch |  44 ++++
>> ...uild-failure-with-Linux-5.19-and-6.1.patch |  98 ++++++++
>> ...on_parameters-Linux-6.1-build-failur.patch | 216 ++++++++++++++++++
>> 4 files changed, 392 insertions(+)
>> create mode 100644 package/wilc-driver/0001-cfg80211.c-fix-missing-prandom_u32-with-Linux-6.1.0.patch
>> create mode 100644 package/wilc-driver/0002-spi.c-fix-build-failure-on-remove-callback.patch
>> create mode 100644 package/wilc-driver/0003-cfg80211.c-fix-build-failure-with-Linux-5.19-and-6.1.patch
>> create mode 100644 package/wilc-driver/0004-Fix-struct-station_parameters-Linux-6.1-build-failur.patch
> 
> Applied to master, thanks. However, it is worth mentioning that the
> real "upstream" for this driver is the linux4sam Linux tree at
> https://github.com/linux4sam/linux-at91.

Ah, yes

> They are currently based on
> 5.15, but I suppose they will rebase soon on 6.1,

I think so too

> so they might be
> interested in your fixes.

How can I point my fixes? Do you think it’s enough to open an Issue in linux-at91 GitHub?

> I don't know if/when the out-of-tree variant
> of the WILC driver at
> https://github.com/embeddedTS/wilc3000-external-module gets synced from
> the linux4sam tree.

I’ve compared the two drivers and they are pretty the same, not completely but very close excluding the various #ifdef’s.
I don’t either know how that repo is handled but I can monitor it.

Best regards
Giulio

> 
> Best regards,
> 
> 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] 13+ messages in thread

* Re: [Buildroot] [PATCH] package/wilc-driver: fix build failure up to Linux 6.1
  2022-12-29 22:04   ` Giulio Benetti
@ 2022-12-29 22:06     ` Giulio Benetti
  2022-12-31 13:23       ` Thomas Petazzoni via buildroot
  2023-01-02 22:28     ` Kris Bahnsen via buildroot
  1 sibling, 1 reply; 13+ messages in thread
From: Giulio Benetti @ 2022-12-29 22:06 UTC (permalink / raw)
  To: Thomas Petazzoni; +Cc: Kris Bahnsen, buildroot


> Il giorno 29 dic 2022, alle ore 23:04, Giulio Benetti <giulio.benetti@benettiengineering.com> ha scritto:
> 
> Hi Thomas,
> 
>> Il giorno 29 dic 2022, alle ore 09:58, Thomas Petazzoni <thomas.petazzoni@bootlin.com> ha scritto:
>> 
>> On Wed, 28 Dec 2022 21:53:23 +0100
>> Giulio Benetti <giulio.benetti@benettiengineering.com> wrote:
>> 
>>> Add patches pending upstream[0] to handle various data types and api
>>> changes up to Linux 6.1.
>>> 
>>> [0]: https://github.com/embeddedTS/wilc3000-external-module/pull/2
>>> 
>>> Fixes:
>>> http://autobuild.buildroot.net/results/6aa7475a21a6060e9fce3552f73e6e7100a8b2aa
>>> 
>>> Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
>>> ---
>>> ...missing-prandom_u32-with-Linux-6.1.0.patch |  34 +++
>>> ...fix-build-failure-on-remove-callback.patch |  44 ++++
>>> ...uild-failure-with-Linux-5.19-and-6.1.patch |  98 ++++++++
>>> ...on_parameters-Linux-6.1-build-failur.patch | 216 ++++++++++++++++++
>>> 4 files changed, 392 insertions(+)
>>> create mode 100644 package/wilc-driver/0001-cfg80211.c-fix-missing-prandom_u32-with-Linux-6.1.0.patch
>>> create mode 100644 package/wilc-driver/0002-spi.c-fix-build-failure-on-remove-callback.patch
>>> create mode 100644 package/wilc-driver/0003-cfg80211.c-fix-build-failure-with-Linux-5.19-and-6.1.patch
>>> create mode 100644 package/wilc-driver/0004-Fix-struct-station_parameters-Linux-6.1-build-failur.patch
>> 
>> Applied to master, thanks. However, it is worth mentioning that the
>> real "upstream" for this driver is the linux4sam Linux tree at
>> https://github.com/linux4sam/linux-at91.
> 
> Ah, yes
> 
>> They are currently based on
>> 5.15, but I suppose they will rebase soon on 6.1,
> 
> I think so too
> 
>> so they might be
>> interested in your fixes.
> 
> How can I point my fixes? Do you think it’s enough to open an Issue in linux-at91 GitHub?

They don’t have the Issue available in GitHub, I send an email to the maintainer then.

Best regards
Giulio

> 
>> I don't know if/when the out-of-tree variant
>> of the WILC driver at
>> https://github.com/embeddedTS/wilc3000-external-module gets synced from
>> the linux4sam tree.
> 
> I’ve compared the two drivers and they are pretty the same, not completely but very close excluding the various #ifdef’s.
> I don’t either know how that repo is handled but I can monitor it.
> 
> Best regards
> Giulio
> 
>> 
>> Best regards,
>> 
>> 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] 13+ messages in thread

* Re: [Buildroot] [PATCH] package/wilc-driver: fix build failure up to Linux 6.1
  2022-12-29 22:06     ` Giulio Benetti
@ 2022-12-31 13:23       ` Thomas Petazzoni via buildroot
  2022-12-31 17:51         ` Giulio Benetti
  0 siblings, 1 reply; 13+ messages in thread
From: Thomas Petazzoni via buildroot @ 2022-12-31 13:23 UTC (permalink / raw)
  To: Giulio Benetti; +Cc: Kris Bahnsen, buildroot

On Thu, 29 Dec 2022 23:06:55 +0100
Giulio Benetti <giulio.benetti@benettiengineering.com> wrote:

> > How can I point my fixes? Do you think it’s enough to open an Issue in linux-at91 GitHub?  
> 
> They don’t have the Issue available in GitHub, I send an email to the maintainer then.

Open a pull request.

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH] package/wilc-driver: fix build failure up to Linux 6.1
  2022-12-31 13:23       ` Thomas Petazzoni via buildroot
@ 2022-12-31 17:51         ` Giulio Benetti
  2023-01-03  8:21           ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 13+ messages in thread
From: Giulio Benetti @ 2022-12-31 17:51 UTC (permalink / raw)
  To: Thomas Petazzoni; +Cc: Kris Bahnsen, buildroot

Hello Thomas,

On 31/12/22 14:23, Thomas Petazzoni via buildroot wrote:
> On Thu, 29 Dec 2022 23:06:55 +0100
> Giulio Benetti <giulio.benetti@benettiengineering.com> wrote:
> 
>>> How can I point my fixes? Do you think it’s enough to open an Issue in linux-at91 GitHub?
>>
>> They don’t have the Issue available in GitHub, I send an email to the maintainer then.
> 
> Open a pull request.

Do you mean once they create a branch for 6.1?
Or even against 5.15, 5.10 etc. if there are changes that regard those
versions?

Sorry but it's not clear to me what you mean.

Best regards
-- 
Giulio Benetti
CEO/CTO@Benetti Engineering sas
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH] package/wilc-driver: fix build failure up to Linux 6.1
  2022-12-28 20:53 [Buildroot] [PATCH] package/wilc-driver: fix build failure up to Linux 6.1 Giulio Benetti
  2022-12-29  8:58 ` Thomas Petazzoni via buildroot
@ 2023-01-02 19:24 ` Kris Bahnsen via buildroot
  2023-01-02 23:05   ` Giulio Benetti
  1 sibling, 1 reply; 13+ messages in thread
From: Kris Bahnsen via buildroot @ 2023-01-02 19:24 UTC (permalink / raw)
  To: Giulio Benetti, buildroot

On Wed, 2022-12-28 at 21:53 +0100, Giulio Benetti wrote:
> Add patches pending upstream[0] to handle various data types and api
> changes up to Linux 6.1.
> 
> [0]: https://github.com/embeddedTS/wilc3000-external-module/pull/2
> 
> Fixes:
> http://autobuild.buildroot.net/results/6aa7475a21a6060e9fce3552f73e6e7100a8b2aa
> 
> Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
> ---
>  ...missing-prandom_u32-with-Linux-6.1.0.patch |  34 +++
>  ...fix-build-failure-on-remove-callback.patch |  44 ++++
>  ...uild-failure-with-Linux-5.19-and-6.1.patch |  98 ++++++++
>  ...on_parameters-Linux-6.1-build-failur.patch | 216 ++++++++++++++++++
>  4 files changed, 392 insertions(+)
>  create mode 100644 package/wilc-driver/0001-cfg80211.c-fix-missing-prandom_u32-with-Linux-6.1.0.patch
>  create mode 100644 package/wilc-driver/0002-spi.c-fix-build-failure-on-remove-callback.patch
>  create mode 100644 package/wilc-driver/0003-cfg80211.c-fix-build-failure-with-Linux-5.19-and-6.1.patch
>  create mode 100644 package/wilc-driver/0004-Fix-struct-station_parameters-Linux-6.1-build-failur.patch
> 

Giulio, all,

I figure this is the most appropriate place to have a discussion on
this topic as these patches were also pushed to our github repo:
https://github.com/embeddedTS/wilc3000-external-module/

I want to note that we are not intending on doing any maintenance
or patch work on this driver, except to keep this driver functional
on our platforms. It is maintained as a buildable external module
of this folder tree:
https://github.com/linux4sam/linux-at91/tree/master/drivers/net/wireless/microchip

We did this because during the Microchip takeover they abandoned
their maintained external tree as well as halted any plans to
bring WILC3000 support to the kernel upstream. Our fork gives us
easy access to building the modules without having to keep pulling
changes in to all of our kernels.

I'm not sure the best way to go about handling these patches as
Microchip is currently only maintaining support for 5.15 it
appears. I also don't want to pollute our external module tree
with fixes that arn't in the upstream we're pulling in.

Giulio, would you be willing to attempt pushing these changes
to the Microchip repo?

Does it make more sense to just leave these as patches to the
driver in Buildroot?

Would it make sense to instead apply some limits to the package
or external module to only build on already compatible kernel
versions?

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

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

* Re: [Buildroot] [PATCH] package/wilc-driver: fix build failure up to Linux 6.1
  2022-12-29 22:04   ` Giulio Benetti
  2022-12-29 22:06     ` Giulio Benetti
@ 2023-01-02 22:28     ` Kris Bahnsen via buildroot
  1 sibling, 0 replies; 13+ messages in thread
From: Kris Bahnsen via buildroot @ 2023-01-02 22:28 UTC (permalink / raw)
  To: Giulio Benetti, Thomas Petazzoni; +Cc: buildroot

All,

I accidentally replied out of the thread and I wanted to follow up
here just to make sure it got organized in the right place. See my
previous message here:
https://lists.buildroot.org/pipermail/buildroot/2023-January/659164.html

On Thu, 2022-12-29 at 23:04 +0100, Giulio Benetti wrote:
> Hi Thomas,
> 
> > Il giorno 29 dic 2022, alle ore 09:58, Thomas Petazzoni <thomas.petazzoni@bootlin.com> ha scritto:
> > 
> > On Wed, 28 Dec 2022 21:53:23 +0100
> > Giulio Benetti <giulio.benetti@benettiengineering.com> wrote:
> > 
> > > Add patches pending upstream[0] to handle various data types and api
> > > changes up to Linux 6.1.
> > > 
> > > [0]: https://github.com/embeddedTS/wilc3000-external-module/pull/2
> > > 
> > > Fixes:
> > > http://autobuild.buildroot.net/results/6aa7475a21a6060e9fce3552f73e6e7100a8b2aa
> > > 
> > > Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
> > > ---
> > > ...missing-prandom_u32-with-Linux-6.1.0.patch |  34 +++
> > > ...fix-build-failure-on-remove-callback.patch |  44 ++++
> > > ...uild-failure-with-Linux-5.19-and-6.1.patch |  98 ++++++++
> > > ...on_parameters-Linux-6.1-build-failur.patch | 216 ++++++++++++++++++
> > > 4 files changed, 392 insertions(+)
> > > create mode 100644 package/wilc-driver/0001-cfg80211.c-fix-missing-prandom_u32-with-Linux-6.1.0.patch
> > > create mode 100644 package/wilc-driver/0002-spi.c-fix-build-failure-on-remove-callback.patch
> > > create mode 100644 package/wilc-driver/0003-cfg80211.c-fix-build-failure-with-Linux-5.19-and-6.1.patch
> > > create mode 100644 package/wilc-driver/0004-Fix-struct-station_parameters-Linux-6.1-build-failur.patch
> > 
> > Applied to master, thanks. However, it is worth mentioning that the
> > real "upstream" for this driver is the linux4sam Linux tree at
> > https://github.com/linux4sam/linux-at91.
> 
> Ah, yes
> 
> > They are currently based on
> > 5.15, but I suppose they will rebase soon on 6.1,
> 
> I think so too
> 
> > so they might be
> > interested in your fixes.
> 
> How can I point my fixes? Do you think it’s enough to open an Issue in linux-at91 GitHub?
> 
> > I don't know if/when the out-of-tree variant
> > of the WILC driver at
> > https://github.com/embeddedTS/wilc3000-external-module gets synced from
> > the linux4sam tree.
> 
> I’ve compared the two drivers and they are pretty the same, not completely but very close excluding the various #ifdef’s.
> I don’t either know how that repo is handled but I can monitor it.

The external is currently a release tag (or a few) behind. The latest
changes in the linux4sam kernel tree remove a lot of the #ifdefs as you
noted which ends up preventing it from compiling against older kernels.

We've tested the external tree against 4.9, 5.10, and 5.15 with success.

-Kris

> 
> Best regards
> Giulio
> 
> > 
> > Best regards,
> > 
> > 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
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH] package/wilc-driver: fix build failure up to Linux 6.1
  2023-01-02 19:24 ` Kris Bahnsen via buildroot
@ 2023-01-02 23:05   ` Giulio Benetti
  2023-01-02 23:52     ` Kris Bahnsen via buildroot
  0 siblings, 1 reply; 13+ messages in thread
From: Giulio Benetti @ 2023-01-02 23:05 UTC (permalink / raw)
  To: kris, buildroot; +Cc: Thomas Petazzoni

Hi Kris, Thomas, All,

On 02/01/23 20:24, Kris Bahnsen wrote:
> On Wed, 2022-12-28 at 21:53 +0100, Giulio Benetti wrote:
>> Add patches pending upstream[0] to handle various data types and api
>> changes up to Linux 6.1.
>>
>> [0]: https://github.com/embeddedTS/wilc3000-external-module/pull/2
>>
>> Fixes:
>> http://autobuild.buildroot.net/results/6aa7475a21a6060e9fce3552f73e6e7100a8b2aa
>>
>> Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
>> ---
>>   ...missing-prandom_u32-with-Linux-6.1.0.patch |  34 +++
>>   ...fix-build-failure-on-remove-callback.patch |  44 ++++
>>   ...uild-failure-with-Linux-5.19-and-6.1.patch |  98 ++++++++
>>   ...on_parameters-Linux-6.1-build-failur.patch | 216 ++++++++++++++++++
>>   4 files changed, 392 insertions(+)
>>   create mode 100644 package/wilc-driver/0001-cfg80211.c-fix-missing-prandom_u32-with-Linux-6.1.0.patch
>>   create mode 100644 package/wilc-driver/0002-spi.c-fix-build-failure-on-remove-callback.patch
>>   create mode 100644 package/wilc-driver/0003-cfg80211.c-fix-build-failure-with-Linux-5.19-and-6.1.patch
>>   create mode 100644 package/wilc-driver/0004-Fix-struct-station_parameters-Linux-6.1-build-failur.patch
>>
> 
> Giulio, all,
> 
> I figure this is the most appropriate place to have a discussion on
> this topic as these patches were also pushed to our github repo:
> https://github.com/embeddedTS/wilc3000-external-module/
> 
> I want to note that we are not intending on doing any maintenance
> or patch work on this driver, except to keep this driver functional
> on our platforms. 

Oh, I thought the goal was to keep the module successfully building
through all Linux versions like we usually have in Buildroot for other
packages. For example all the Wi-Fi modules(i.e. rtlxxx packages) and
gpu(mali-driver, sunxi-mali-utgard, kernel-module-imx-gpu-viv etc.) or 
other out of tree drivers.

> It is maintained as a buildable external module
> of this folder tree:
> https://github.com/linux4sam/linux-at91/tree/master/drivers/net/wireless/microchip

The problem is that with that we can't build for older Linux versions
and this is one of our goals. Someone can be interested in having it
running on Linux 4.x or earlier.

> We did this because during the Microchip takeover they abandoned
> their maintained external tree as well as halted any plans to
> bring WILC3000 support to the kernel upstream. Our fork gives us
> easy access to building the modules without having to keep pulling
> changes in to all of our kernels.
> 
> I'm not sure the best way to go about handling these patches as
> Microchip is currently only maintaining support for 5.15 it
> appears. I also don't want to pollute our external module tree
> with fixes that arn't in the upstream we're pulling in.
> 
> Giulio, would you be willing to attempt pushing these changes
> to the Microchip repo?

Yes, this is the idea once they create the 6.1 branch, at least I
expect they will do it soon since it's the new Linux LTS version.
Then for sure I will open a PR without all the #ifdef's I've created
in the PR I've opened to your Repo. Of course those patches will be
usable only for Linux 6.1 and that's it.

> Does it make more sense to just leave these as patches to the
> driver in Buildroot?

Not very much, because they must be reworked over the time and they
will continue to increase along with Linux versions. For sure we hope
WILC1000/3000 will be totally upstreamed at a certain point. But anyway
we will need your repository(or a fork of it) to keep all the #ifdef's
for LINUX_VERSION to support it on old Linux versions.

> Would it make sense to instead apply some limits to the package
> or external module to only build on already compatible kernel
> versions?

I'd like to support the driver for any possible Linux version like we
do for the other drivers in Buildroot.

I understand that there is an effort on your side to test the changes
you pull, but this will keep your repository aligned with the latest
Linux versions and it will be build-tested a lot with our autobuilders.

This is my 2 cents. I leave the last answers to the maintainers, Thomas
is one of them.

Best regards!
-- 
Giulio Benetti
CEO/CTO@Benetti Engineering sas
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH] package/wilc-driver: fix build failure up to Linux 6.1
  2023-01-02 23:05   ` Giulio Benetti
@ 2023-01-02 23:52     ` Kris Bahnsen via buildroot
  2023-01-11 12:02       ` Giulio Benetti
  0 siblings, 1 reply; 13+ messages in thread
From: Kris Bahnsen via buildroot @ 2023-01-02 23:52 UTC (permalink / raw)
  To: Giulio Benetti, buildroot; +Cc: Thomas Petazzoni

Giulio,

On Tue, 2023-01-03 at 00:05 +0100, Giulio Benetti wrote:
> Hi Kris, Thomas, All,
> 
> On 02/01/23 20:24, Kris Bahnsen wrote:
> > On Wed, 2022-12-28 at 21:53 +0100, Giulio Benetti wrote:
> > > Add patches pending upstream[0] to handle various data types and api
> > > changes up to Linux 6.1.
> > > 
> > > [0]: https://github.com/embeddedTS/wilc3000-external-module/pull/2
> > > 
> > > Fixes:
> > > http://autobuild.buildroot.net/results/6aa7475a21a6060e9fce3552f73e6e7100a8b2aa
> > > 
> > > Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
> > > ---
> > >   ...missing-prandom_u32-with-Linux-6.1.0.patch |  34 +++
> > >   ...fix-build-failure-on-remove-callback.patch |  44 ++++
> > >   ...uild-failure-with-Linux-5.19-and-6.1.patch |  98 ++++++++
> > >   ...on_parameters-Linux-6.1-build-failur.patch | 216 ++++++++++++++++++
> > >   4 files changed, 392 insertions(+)
> > >   create mode 100644 package/wilc-driver/0001-cfg80211.c-fix-missing-prandom_u32-with-Linux-6.1.0.patch
> > >   create mode 100644 package/wilc-driver/0002-spi.c-fix-build-failure-on-remove-callback.patch
> > >   create mode 100644 package/wilc-driver/0003-cfg80211.c-fix-build-failure-with-Linux-5.19-and-6.1.patch
> > >   create mode 100644 package/wilc-driver/0004-Fix-struct-station_parameters-Linux-6.1-build-failur.patch
> > > 
> > 
> > Giulio, all,
> > 
> > I figure this is the most appropriate place to have a discussion on
> > this topic as these patches were also pushed to our github repo:
> > https://github.com/embeddedTS/wilc3000-external-module/
> > 
> > I want to note that we are not intending on doing any maintenance
> > or patch work on this driver, except to keep this driver functional
> > on our platforms. 
> 
> Oh, I thought the goal was to keep the module successfully building
> through all Linux versions like we usually have in Buildroot for other
> packages. For example all the Wi-Fi modules(i.e. rtlxxx packages) and
> gpu(mali-driver, sunxi-mali-utgard, kernel-module-imx-gpu-viv etc.) or 
> other out of tree drivers.

Not quite. We decided to carve the tree from Microchip and make it
externally buildable. We submitted it to Buildroot because it had
appeared that the WILC support was neglected by Microchip. We took
that opportunity to at least keep the firmware up to date while also
giving any supported platforms a more up-to-date access to a driver.

We've been mostly relying on upstream from Microchip (and have an
outstanding driver bug open with them for the WILC3000 that has
been in process for the better part of 4 months) and touching bits
that make sense to touch that do not impact function.

> 
> > It is maintained as a buildable external module
> > of this folder tree:
> > https://github.com/linux4sam/linux-at91/tree/master/drivers/net/wireless/microchip
> 
> The problem is that with that we can't build for older Linux versions
> and this is one of our goals. Someone can be interested in having it
> running on Linux 4.x or earlier.

Which is why we havn't pulled in their latest round of changes
and any feature updates from them we now have to carefully navigate.

> 
> > We did this because during the Microchip takeover they abandoned
> > their maintained external tree as well as halted any plans to
> > bring WILC3000 support to the kernel upstream. Our fork gives us
> > easy access to building the modules without having to keep pulling
> > changes in to all of our kernels.
> > 
> > I'm not sure the best way to go about handling these patches as
> > Microchip is currently only maintaining support for 5.15 it
> > appears. I also don't want to pollute our external module tree
> > with fixes that arn't in the upstream we're pulling in.
> > 
> > Giulio, would you be willing to attempt pushing these changes
> > to the Microchip repo?
> 
> Yes, this is the idea once they create the 6.1 branch, at least I
> expect they will do it soon since it's the new Linux LTS version.
> Then for sure I will open a PR without all the #ifdef's I've created
> in the PR I've opened to your Repo. Of course those patches will be
> usable only for Linux 6.1 and that's it.

If we pull future patches in from linux4wilc tree, we will be careful
not to upset the existing #ifdef madness to keep backward compatible
support. But we do want to avoid getting ahead of linux4wilc if we
can so if those changes do come in eventually, we can avoid an
excessive amount of conflicts.

> 
> > Does it make more sense to just leave these as patches to the
> > driver in Buildroot?
> 
> Not very much, because they must be reworked over the time and they
> will continue to increase along with Linux versions. For sure we hope
> WILC1000/3000 will be totally upstreamed at a certain point. But anyway
> we will need your repository(or a fork of it) to keep all the #ifdef's
> for LINUX_VERSION to support it on old Linux versions.

Unfortunately, while WILC1000 support is upstream, WILC3000 will not be
upstreamed (according to a conversation with Microchip a few months
back). This means unless they have a change of heart, someone else takes
ownership, or we take ownership of the driver, it will likely remain
locked to Microchip's kernel and this external module will continue
to exist as needed.

> 
> > Would it make sense to instead apply some limits to the package
> > or external module to only build on already compatible kernel
> > versions?
> 
> I'd like to support the driver for any possible Linux version like we
> do for the other drivers in Buildroot.
> 
> I understand that there is an effort on your side to test the changes
> you pull, but this will keep your repository aligned with the latest
> Linux versions and it will be build-tested a lot with our autobuilders.
> 
> This is my 2 cents. I leave the last answers to the maintainers, Thomas
> is one of them.

We're not opposed to the idea, just hesitant to taking on that kind
of ownership.

We're doing some porting work at the moment, to get our LTS platforms
all up to kernel 5.10. From there, we may start pushing basic support
for various platforms to upstream kernel. I think once we get there
we would be more receptive to ownership of the WILC3000 driver to
keep our platforms running.

> 
> Best regards!
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH] package/wilc-driver: fix build failure up to Linux 6.1
  2022-12-31 17:51         ` Giulio Benetti
@ 2023-01-03  8:21           ` Thomas Petazzoni via buildroot
  2023-01-11 11:59             ` Giulio Benetti
  0 siblings, 1 reply; 13+ messages in thread
From: Thomas Petazzoni via buildroot @ 2023-01-03  8:21 UTC (permalink / raw)
  To: Giulio Benetti; +Cc: Kris Bahnsen, buildroot

On Sat, 31 Dec 2022 18:51:34 +0100
Giulio Benetti <giulio.benetti@benettiengineering.com> wrote:

> > Open a pull request.  
> 
> Do you mean once they create a branch for 6.1?
> Or even against 5.15, 5.10 etc. if there are changes that regard those
> versions?
> 
> Sorry but it's not clear to me what you mean.

You have a point. Indeed, until they start moving to 6.1, there's not
much you can do :-/

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH] package/wilc-driver: fix build failure up to Linux 6.1
  2023-01-03  8:21           ` Thomas Petazzoni via buildroot
@ 2023-01-11 11:59             ` Giulio Benetti
  0 siblings, 0 replies; 13+ messages in thread
From: Giulio Benetti @ 2023-01-11 11:59 UTC (permalink / raw)
  To: Thomas Petazzoni; +Cc: Kris Bahnsen, buildroot

Hi Thomas, Kris, All,

On 03/01/23 09:21, Thomas Petazzoni via buildroot wrote:
> On Sat, 31 Dec 2022 18:51:34 +0100
> Giulio Benetti <giulio.benetti@benettiengineering.com> wrote:
> 
>>> Open a pull request.
>>
>> Do you mean once they create a branch for 6.1?
>> Or even against 5.15, 5.10 etc. if there are changes that regard those
>> versions?
>>
>> Sorry but it's not clear to me what you mean.
> 
> You have a point. Indeed, until they start moving to 6.1, there's not
> much you can do :-/

linux-6.1-mchp branch is out:
https://github.com/linux4sam/linux-at91/tree/linux-6.1-mchp

I've already built with WILC1000 support and it built successfully, so
no need for other patches on my side.

Kris, if you're interested you can merge their changes into your
repository for WILC1000 if there is some enhancement.

Best regards
-- 
Giulio Benetti
CEO/CTO@Benetti Engineering sas
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH] package/wilc-driver: fix build failure up to Linux 6.1
  2023-01-02 23:52     ` Kris Bahnsen via buildroot
@ 2023-01-11 12:02       ` Giulio Benetti
  0 siblings, 0 replies; 13+ messages in thread
From: Giulio Benetti @ 2023-01-11 12:02 UTC (permalink / raw)
  To: kris, buildroot; +Cc: Thomas Petazzoni

Hi Kris,

On 03/01/23 00:52, Kris Bahnsen via buildroot wrote:
> Giulio,
> 
> On Tue, 2023-01-03 at 00:05 +0100, Giulio Benetti wrote:
>> Hi Kris, Thomas, All,
>>
>> On 02/01/23 20:24, Kris Bahnsen wrote:
>>> On Wed, 2022-12-28 at 21:53 +0100, Giulio Benetti wrote:
>>>> Add patches pending upstream[0] to handle various data types and api
>>>> changes up to Linux 6.1.
>>>>
>>>> [0]: https://github.com/embeddedTS/wilc3000-external-module/pull/2
>>>>
>>>> Fixes:
>>>> http://autobuild.buildroot.net/results/6aa7475a21a6060e9fce3552f73e6e7100a8b2aa
>>>>
>>>> Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
>>>> ---
>>>>    ...missing-prandom_u32-with-Linux-6.1.0.patch |  34 +++
>>>>    ...fix-build-failure-on-remove-callback.patch |  44 ++++
>>>>    ...uild-failure-with-Linux-5.19-and-6.1.patch |  98 ++++++++
>>>>    ...on_parameters-Linux-6.1-build-failur.patch | 216 ++++++++++++++++++
>>>>    4 files changed, 392 insertions(+)
>>>>    create mode 100644 package/wilc-driver/0001-cfg80211.c-fix-missing-prandom_u32-with-Linux-6.1.0.patch
>>>>    create mode 100644 package/wilc-driver/0002-spi.c-fix-build-failure-on-remove-callback.patch
>>>>    create mode 100644 package/wilc-driver/0003-cfg80211.c-fix-build-failure-with-Linux-5.19-and-6.1.patch
>>>>    create mode 100644 package/wilc-driver/0004-Fix-struct-station_parameters-Linux-6.1-build-failur.patch
>>>>
>>>
>>> Giulio, all,
>>>
>>> I figure this is the most appropriate place to have a discussion on
>>> this topic as these patches were also pushed to our github repo:
>>> https://github.com/embeddedTS/wilc3000-external-module/
>>>
>>> I want to note that we are not intending on doing any maintenance
>>> or patch work on this driver, except to keep this driver functional
>>> on our platforms.
>>
>> Oh, I thought the goal was to keep the module successfully building
>> through all Linux versions like we usually have in Buildroot for other
>> packages. For example all the Wi-Fi modules(i.e. rtlxxx packages) and
>> gpu(mali-driver, sunxi-mali-utgard, kernel-module-imx-gpu-viv etc.) or
>> other out of tree drivers.
> 
> Not quite. We decided to carve the tree from Microchip and make it
> externally buildable. We submitted it to Buildroot because it had
> appeared that the WILC support was neglected by Microchip. We took
> that opportunity to at least keep the firmware up to date while also
> giving any supported platforms a more up-to-date access to a driver.
> 
> We've been mostly relying on upstream from Microchip (and have an
> outstanding driver bug open with them for the WILC3000 that has
> been in process for the better part of 4 months) and touching bits
> that make sense to touch that do not impact function.
> 
>>
>>> It is maintained as a buildable external module
>>> of this folder tree:
>>> https://github.com/linux4sam/linux-at91/tree/master/drivers/net/wireless/microchip
>>
>> The problem is that with that we can't build for older Linux versions
>> and this is one of our goals. Someone can be interested in having it
>> running on Linux 4.x or earlier.
> 
> Which is why we havn't pulled in their latest round of changes
> and any feature updates from them we now have to carefully navigate.
> 
>>
>>> We did this because during the Microchip takeover they abandoned
>>> their maintained external tree as well as halted any plans to
>>> bring WILC3000 support to the kernel upstream. Our fork gives us
>>> easy access to building the modules without having to keep pulling
>>> changes in to all of our kernels.
>>>
>>> I'm not sure the best way to go about handling these patches as
>>> Microchip is currently only maintaining support for 5.15 it
>>> appears. I also don't want to pollute our external module tree
>>> with fixes that arn't in the upstream we're pulling in.
>>>
>>> Giulio, would you be willing to attempt pushing these changes
>>> to the Microchip repo?
>>
>> Yes, this is the idea once they create the 6.1 branch, at least I
>> expect they will do it soon since it's the new Linux LTS version.
>> Then for sure I will open a PR without all the #ifdef's I've created
>> in the PR I've opened to your Repo. Of course those patches will be
>> usable only for Linux 6.1 and that's it.
> 
> If we pull future patches in from linux4wilc tree, we will be careful
> not to upset the existing #ifdef madness to keep backward compatible
> support. But we do want to avoid getting ahead of linux4wilc if we
> can so if those changes do come in eventually, we can avoid an
> excessive amount of conflicts.

I understand

>>
>>> Does it make more sense to just leave these as patches to the
>>> driver in Buildroot?
>>
>> Not very much, because they must be reworked over the time and they
>> will continue to increase along with Linux versions. For sure we hope
>> WILC1000/3000 will be totally upstreamed at a certain point. But anyway
>> we will need your repository(or a fork of it) to keep all the #ifdef's
>> for LINUX_VERSION to support it on old Linux versions.
> 
> Unfortunately, while WILC1000 support is upstream, WILC3000 will not be
> upstreamed (according to a conversation with Microchip a few months
> back). This means unless they have a change of heart, someone else takes
> ownership, or we take ownership of the driver, it will likely remain
> locked to Microchip's kernel and this external module will continue
> to exist as needed.

Ok

>>
>>> Would it make sense to instead apply some limits to the package
>>> or external module to only build on already compatible kernel
>>> versions?
>>
>> I'd like to support the driver for any possible Linux version like we
>> do for the other drivers in Buildroot.
>>
>> I understand that there is an effort on your side to test the changes
>> you pull, but this will keep your repository aligned with the latest
>> Linux versions and it will be build-tested a lot with our autobuilders.
>>
>> This is my 2 cents. I leave the last answers to the maintainers, Thomas
>> is one of them.
> 
> We're not opposed to the idea, just hesitant to taking on that kind
> of ownership.
> 
> We're doing some porting work at the moment, to get our LTS platforms
> all up to kernel 5.10. From there, we may start pushing basic support
> for various platforms to upstream kernel. I think once we get there
> we would be more receptive to ownership of the WILC3000 driver to
> keep our platforms running.
Sorry for the late reply.

Ok then, PR is there pending whenever and if you want to merge or ask
for changes.

Best regards
-- 
Giulio Benetti
CEO/CTO@Benetti Engineering sas
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2023-01-11 12:02 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-28 20:53 [Buildroot] [PATCH] package/wilc-driver: fix build failure up to Linux 6.1 Giulio Benetti
2022-12-29  8:58 ` Thomas Petazzoni via buildroot
2022-12-29 22:04   ` Giulio Benetti
2022-12-29 22:06     ` Giulio Benetti
2022-12-31 13:23       ` Thomas Petazzoni via buildroot
2022-12-31 17:51         ` Giulio Benetti
2023-01-03  8:21           ` Thomas Petazzoni via buildroot
2023-01-11 11:59             ` Giulio Benetti
2023-01-02 22:28     ` Kris Bahnsen via buildroot
2023-01-02 19:24 ` Kris Bahnsen via buildroot
2023-01-02 23:05   ` Giulio Benetti
2023-01-02 23:52     ` Kris Bahnsen via buildroot
2023-01-11 12:02       ` Giulio Benetti

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.