hostapd: update to git snapshot of 2018-04-09
[openwrt/staging/wigyori.git] / package / network / services / hostapd / patches / 0103-mesh-relocate-RSN-init-function.patch
1 From cbe8b9901f9cc254cbaa1ec1cee1c52af8f828bf Mon Sep 17 00:00:00 2001
2 From: Peter Oh <peter.oh@bowerswilkins.com>
3 Date: Thu, 12 Apr 2018 02:49:00 -0700
4 Subject: [PATCH 03/15] 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 @@ -333,9 +333,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 @@ -381,6 +378,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;