From cebd9c7c04e355b8996d601c63602512106ca631 Mon Sep 17 00:00:00 2001 From: Giulio Benetti Date: Wed, 9 Aug 2023 23:23:45 +0200 Subject: [PATCH] package/esp-hosted: fix build failure when Linux CONFIG_PM is not defined Add local patch pending upstream[1] to guard structure member wowlan that is only present if CONFIG_PM is defined. Fixes: http://autobuild.buildroot.net/results/d47317640de39baabeefb8d9e04fa7f3e2dc873a [1]: https://github.com/espressif/esp-hosted/pull/254 Signed-off-by: Giulio Benetti Signed-off-by: Thomas Petazzoni --- ...st-fix-build-failure-when-CONFIG_PM-.patch | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 package/esp-hosted/0001-esp_hosted_ng-host-fix-build-failure-when-CONFIG_PM-.patch diff --git a/package/esp-hosted/0001-esp_hosted_ng-host-fix-build-failure-when-CONFIG_PM-.patch b/package/esp-hosted/0001-esp_hosted_ng-host-fix-build-failure-when-CONFIG_PM-.patch new file mode 100644 index 0000000000..abbc64a434 --- /dev/null +++ b/package/esp-hosted/0001-esp_hosted_ng-host-fix-build-failure-when-CONFIG_PM-.patch @@ -0,0 +1,33 @@ +From 56920e3ce04aa2eadb529a6787200789bf1c3925 Mon Sep 17 00:00:00 2001 +From: Giulio Benetti +Date: Wed, 9 Aug 2023 23:16:52 +0200 +Subject: [PATCH] esp_hosted_ng: host: fix build failure when CONFIG_PM is not + defined + +wiphy->wowlan is not defined when CONFIG_PM is not enabled so let's +guard the assignment to wiphy->wowlan according to option CONFIG_PM. + +Upstream: https://github.com/espressif/esp-hosted/pull/254 + +Signed-off-by: Giulio Benetti +--- + esp_hosted_ng/host/esp_cfg80211.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/esp_hosted_ng/host/esp_cfg80211.c b/esp_hosted_ng/host/esp_cfg80211.c +index 70fdbb9773..d3c4108c29 100644 +--- a/esp_hosted_ng/host/esp_cfg80211.c ++++ b/esp_hosted_ng/host/esp_cfg80211.c +@@ -638,7 +638,9 @@ int esp_cfg80211_register(struct esp_adapter *adapter) + wiphy->max_scan_ie_len = 1000; + wiphy->max_sched_scan_ssids = 10; + wiphy->signal_type = CFG80211_SIGNAL_TYPE_MBM; ++#ifdef CONFIG_PM + wiphy->wowlan = &esp_wowlan_support; ++#endif + + /* Advertise SAE support */ + wiphy->features |= NL80211_FEATURE_SAE; +-- +2.34.1 +