Initial Commit
- initial default booting image
This commit is contained in:
@@ -0,0 +1,147 @@
|
||||
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
|
||||
|
||||
31
package/esp-hosted/Config.in
Normal file
31
package/esp-hosted/Config.in
Normal file
@@ -0,0 +1,31 @@
|
||||
comment "esp-hosted needs a Linux kernel to be built"
|
||||
depends on !BR2_s390x
|
||||
depends on !BR2_LINUX_KERNEL
|
||||
|
||||
config BR2_PACKAGE_ESP_HOSTED
|
||||
bool "esp-hosted"
|
||||
depends on !BR2_s390x
|
||||
depends on BR2_LINUX_KERNEL
|
||||
help
|
||||
This package builds and installs the Linux kernel driver for
|
||||
the Esp32-* Linux Wi-Fi driver. It supports both SDIO and SPI
|
||||
busses that is selectable. It is compatible with recent Linux
|
||||
kernels (>= 5.4).
|
||||
|
||||
if BR2_PACKAGE_ESP_HOSTED
|
||||
|
||||
choice
|
||||
prompt "HW interface"
|
||||
default BR2_PACKAGE_ESP_HOSTED_SDIO
|
||||
help
|
||||
Select which bus type esp is attached to
|
||||
|
||||
config BR2_PACKAGE_ESP_HOSTED_SDIO
|
||||
bool "SDIO"
|
||||
|
||||
config BR2_PACKAGE_ESP_HOSTED_SPI
|
||||
bool "SPI"
|
||||
|
||||
endchoice
|
||||
|
||||
endif
|
||||
3
package/esp-hosted/esp-hosted.hash
Normal file
3
package/esp-hosted/esp-hosted.hash
Normal file
@@ -0,0 +1,3 @@
|
||||
# Locally calculated
|
||||
sha256 b8baa6d1c8576f5453e382333bc4aafef1293b4705f073dff5b08d900d10d68c ng-v1.0.6.tar.gz
|
||||
sha256 f6b78c087c3ebdf0f3c13415070dd480a3f35d8fc76f3d02180a407c1c812f79 esp_hosted_ng/host/LICENSE
|
||||
35
package/esp-hosted/esp-hosted.mk
Normal file
35
package/esp-hosted/esp-hosted.mk
Normal file
@@ -0,0 +1,35 @@
|
||||
################################################################################
|
||||
#
|
||||
# esp-hosted
|
||||
#
|
||||
################################################################################
|
||||
|
||||
ESP_HOSTED_VERSION = 1.0.6
|
||||
ESP_HOSTED_SITE = $(call github,espressif,esp-hosted,release/ng-$(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
|
||||
|
||||
define ESP_HOSTED_LINUX_CONFIG_FIXUPS
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_NET)
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_WIRELESS)
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_CFG80211)
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_MAC80211)
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_BT)
|
||||
$(if $(BR2_PACKAGE_ESP_HOSTED_SPI),
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_SPI),
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_MMC))
|
||||
endef
|
||||
|
||||
ifeq ($(BR2_PACKAGE_ESP_HOSTED_SPI),y)
|
||||
ESP_HOSTED_MODULE_MAKE_OPTS = target=spi
|
||||
else
|
||||
ESP_HOSTED_MODULE_MAKE_OPTS = target=sdio
|
||||
endif
|
||||
|
||||
ESP_HOSTED_MODULE_MAKE_OPTS += KCFLAGS="-Wno-error"
|
||||
|
||||
$(eval $(kernel-module))
|
||||
$(eval $(generic-package))
|
||||
Reference in New Issue
Block a user