aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/services/hostapd/patches/004-mesh-use-setup-completion-callback-to-complete-mesh-.patch
diff options
context:
space:
mode:
authorDaniel Golle <daniel@makrotopia.org>2020-07-23 18:34:00 +0100
committerDaniel Golle <daniel@makrotopia.org>2020-07-30 16:27:44 +0100
commit34705946e2e98d96bd3562ea0bd8a34a0aeba456 (patch)
tree5796975da180603ee37ec9466a831e85f38f0eeb /package/network/services/hostapd/patches/004-mesh-use-setup-completion-callback-to-complete-mesh-.patch
parent68ac3f2cddab8422d7de0ce1a78d23edf29012e7 (diff)
downloadupstream-34705946e2e98d96bd3562ea0bd8a34a0aeba456.tar.gz
upstream-34705946e2e98d96bd3562ea0bd8a34a0aeba456.tar.bz2
upstream-34705946e2e98d96bd3562ea0bd8a34a0aeba456.zip
hostapd: update mesh DFS patches and add mesh HE support
Drop outdated and by now broken patchset originally supplied by Peter Oh in August 2018 but never merged upstream. Instead add the more promissing rework recently submitted by Markus Theil who picked up Peter's patchset, fixed and completed it and added support for HE (802.11ax) in mesh mode. This is only compile tested and needs some real-life testing. Fixes: FS#3214 Fixes: 167028b750 ("hostapd: Update to version 2.9 (2019-08-08)") Fixes: 0a3ec87a66 ("hostapd: update to latest Git hostap_2_9-1238-gdd2daf0848ed") Fixes: 017320ead3 ("hostapd: bring back mesh patches") Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Diffstat (limited to 'package/network/services/hostapd/patches/004-mesh-use-setup-completion-callback-to-complete-mesh-.patch')
-rw-r--r--package/network/services/hostapd/patches/004-mesh-use-setup-completion-callback-to-complete-mesh-.patch124
1 files changed, 0 insertions, 124 deletions
diff --git a/package/network/services/hostapd/patches/004-mesh-use-setup-completion-callback-to-complete-mesh-.patch b/package/network/services/hostapd/patches/004-mesh-use-setup-completion-callback-to-complete-mesh-.patch
deleted file mode 100644
index 54dea274fa..0000000000
--- a/package/network/services/hostapd/patches/004-mesh-use-setup-completion-callback-to-complete-mesh-.patch
+++ /dev/null
@@ -1,124 +0,0 @@
-From c05ace7510ead96e72b97ce47b33f7b5865d6d36 Mon Sep 17 00:00:00 2001
-From: Peter Oh <peter.oh@bowerswilkins.com>
-Date: Mon, 27 Aug 2018 14:28:38 -0700
-Subject: [PATCH 1/7] mesh: use setup completion callback to complete mesh join
-
-mesh join function is the last function to be called during
-mesh join process, but it's been called a bit earlier than
-it's supposed to be, so that some mesh parameter values
-such as VHT capabilities not applied correct when mesh join
-is in process.
-Moreover current design of mesh join that is called directly
-after mesh initialization isn't suitable for DFS channels to use,
-since mesh join process should be paused until DFS CAC is
-done and resumed after it's done.
-The callback will be called by hostapd_setup_interface_complete_sync.
-There is possiblity that completing mesh init fails, so add error
-handle codes.
-
-Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
-Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
----
- src/ap/hostapd.c | 11 ++++++++++-
- wpa_supplicant/mesh.c | 13 +++++++------
- 2 files changed, 17 insertions(+), 7 deletions(-)
-
---- a/src/ap/hostapd.c
-+++ b/src/ap/hostapd.c
-@@ -434,6 +434,8 @@ static void hostapd_free_hapd_data(struc
- #ifdef CONFIG_MESH
- wpabuf_free(hapd->mesh_pending_auth);
- hapd->mesh_pending_auth = NULL;
-+ /* handling setup failure is already done */
-+ hapd->setup_complete_cb = NULL;
- #endif /* CONFIG_MESH */
-
- hostapd_clean_rrm(hapd);
-@@ -2156,6 +2158,13 @@ dfs_offload:
- if (hapd->setup_complete_cb)
- hapd->setup_complete_cb(hapd->setup_complete_cb_ctx);
-
-+#ifdef CONFIG_MESH
-+ if (delay_apply_cfg && !iface->mconf) {
-+ wpa_printf(MSG_ERROR, "Error while completing mesh init");
-+ goto fail;
-+ }
-+#endif /* CONFIG_MESH */
-+
- wpa_printf(MSG_DEBUG, "%s: Setup of interface done.",
- iface->bss[0]->conf->iface);
- if (iface->interfaces && iface->interfaces->terminate_on_error > 0)
-@@ -2299,7 +2308,7 @@ int hostapd_setup_interface(struct hosta
- ret = setup_interface(iface);
- if (ret) {
- wpa_printf(MSG_ERROR, "%s: Unable to setup interface.",
-- iface->bss[0]->conf->iface);
-+ iface->conf ? iface->conf->bss[0]->iface : "N/A");
- return -1;
- }
-
---- a/wpa_supplicant/mesh.c
-+++ b/wpa_supplicant/mesh.c
-@@ -194,8 +194,9 @@ static int wpas_mesh_init_rsn(struct wpa
- }
-
-
--static int wpas_mesh_complete(struct wpa_supplicant *wpa_s)
-+static void wpas_mesh_complete_cb(void *ctx)
- {
-+ struct wpa_supplicant *wpa_s = ctx;
- struct hostapd_iface *ifmsh = wpa_s->ifmsh;
- struct wpa_driver_mesh_join_params *params = wpa_s->mesh_params;
- struct wpa_ssid *ssid = wpa_s->current_ssid;
-@@ -204,7 +205,7 @@ static int wpas_mesh_complete(struct wpa
- if (!params || !ssid || !ifmsh) {
- wpa_printf(MSG_ERROR, "mesh: %s called without active mesh",
- __func__);
-- return -1;
-+ return;
- }
-
- if (ifmsh->mconf->security != MESH_CONF_SEC_NONE &&
-@@ -213,7 +214,7 @@ static int wpas_mesh_complete(struct wpa
- "mesh: RSN initialization failed - deinit mesh");
- wpa_supplicant_mesh_deinit(wpa_s);
- wpa_drv_leave_mesh(wpa_s);
-- return -1;
-+ return;
- }
-
- if (ssid->key_mgmt & WPA_KEY_MGMT_SAE) {
-@@ -239,8 +240,6 @@ static int wpas_mesh_complete(struct wpa
-
- if (!ret)
- wpa_supplicant_set_state(wpa_s, WPA_COMPLETED);
--
-- return ret;
- }
-
-
-@@ -267,6 +266,7 @@ static int wpa_supplicant_mesh_init(stru
- if (!ifmsh)
- return -ENOMEM;
-
-+ ifmsh->owner = wpa_s;
- ifmsh->drv_flags = wpa_s->drv_flags;
- ifmsh->drv_flags2 = wpa_s->drv_flags2;
- ifmsh->num_bss = 1;
-@@ -285,6 +285,8 @@ static int wpa_supplicant_mesh_init(stru
- bss->drv_priv = wpa_s->drv_priv;
- bss->iface = ifmsh;
- bss->mesh_sta_free_cb = mesh_mpm_free_sta;
-+ bss->setup_complete_cb = wpas_mesh_complete_cb;
-+ bss->setup_complete_cb_ctx = wpa_s;
- frequency = ssid->frequency;
- if (frequency != freq->freq &&
- frequency == freq->freq + freq->sec_channel_offset * 20) {
-@@ -526,7 +528,6 @@ int wpa_supplicant_join_mesh(struct wpa_
- goto out;
- }
-
-- ret = wpas_mesh_complete(wpa_s);
- out:
- return ret;
- }