meta-netmodule-wlan/recipes-connectivity/hostapd/files/017-mesh-fix-mesh_oom-test....

28 lines
1014 B
Diff

From a12ca1d46960736e0a15bc1b07cdfef08aab4b9e Mon Sep 17 00:00:00 2001
From: Markus Theil <markus.theil@tu-ilmenau.de>
Date: Tue, 30 Jun 2020 14:19:05 +0200
Subject: [PATCH] mesh: fix mesh_oom test
Only change freq params, if ifmsh->freq is set initially, which only
happens if hostapd_get_hw_features in setup_interface2 succeeds.
Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
---
wpa_supplicant/mesh.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/wpa_supplicant/mesh.c b/wpa_supplicant/mesh.c
index 81abc5c40..f98e6b883 100644
--- a/wpa_supplicant/mesh.c
+++ b/wpa_supplicant/mesh.c
@@ -218,7 +218,7 @@ static int wpas_mesh_complete(struct wpa_supplicant *wpa_s)
* inspect if channel's been changed since initialized.
* i.e. DFS radar detection
*/
- if (ifmsh->freq != params->freq.freq) {
+ if (ifmsh->freq > 0 && ifmsh->freq != params->freq.freq) {
wpa_s->assoc_freq = ifmsh->freq;
ssid->frequency = ifmsh->freq;
struct he_capabilities *he_capab = NULL;