hostapd: update to git HEAD of 2018-05-21, allow build against wolfssl
[openwrt/staging/wigyori.git] / package / network / services / hostapd / patches / 003-mesh-relocate-RSN-init-function.patch
1 From 95425b5becaeda8a515c942f417696e5df34bbc8 Mon Sep 17 00:00:00 2001
2 From: Peter Oh <peter.oh@bowerswilkins.com>
3 Date: Tue, 17 Apr 2018 21:55:00 -0700
4 Subject: [PATCH 03/16] mesh: relocate RSN init function
5
6 RSN init function should work together with mesh join
7 when it's used. Since mesh join could be called at different stage
8 if DFS channel is used, relocate the function to mesh join.
9 It is still the same call flows of mesh join before this changes
10 if non-DFS channels are used, hence no side effect will occur.
11
12 Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
13 ---
14 wpa_supplicant/mesh.c | 9 ++++++---
15 1 file changed, 6 insertions(+), 3 deletions(-)
16
17 --- a/wpa_supplicant/mesh.c
18 +++ b/wpa_supplicant/mesh.c
19 @@ -335,9 +335,6 @@ static int wpa_supplicant_mesh_init(stru
20 return -1;
21 }
22
23 - if (wpas_mesh_init_rsn(wpa_s))
24 - goto out_free;
25 -
26 wpa_supplicant_conf_ap_ht(wpa_s, ssid, conf);
27
28 return 0;
29 @@ -383,6 +380,12 @@ void wpas_join_mesh(struct wpa_supplican
30 struct wpa_ssid *ssid = wpa_s->current_ssid;
31 int ret = 0;
32
33 + if (wpas_mesh_init_rsn(wpa_s)) {
34 + wpa_printf(MSG_ERROR, "Init RSN failed. Deinit mesh...");
35 + wpa_supplicant_mesh_deinit(wpa_s);
36 + return;
37 + }
38 +
39 if (ssid->key_mgmt & WPA_KEY_MGMT_SAE) {
40 wpa_s->pairwise_cipher = wpa_s->mesh_rsn->pairwise_cipher;
41 wpa_s->group_cipher = wpa_s->mesh_rsn->group_cipher;