hostapd: fix encrypted mesh channel settings
[oweals/openwrt.git] / package / network / services / hostapd / patches / 0108-mesh-set-interface-type-to-mesh-before-setting-inter.patch
1 From 143809f1e60f749a5a5c72735ffa8eb99d602cc1 Mon Sep 17 00:00:00 2001
2 From: Peter Oh <peter.oh@bowerswilkins.com>
3 Date: Thu, 12 Apr 2018 02:49:05 -0700
4 Subject: [PATCH 08/15] mesh: set interface type to mesh before setting
5  interface
6
7 Correct interface type is required to start DFS CAC that can be
8 triggered during interface setup.
9
10 Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
11 ---
12  wpa_supplicant/mesh.c | 10 +++++-----
13  1 file changed, 5 insertions(+), 5 deletions(-)
14
15 --- a/wpa_supplicant/mesh.c
16 +++ b/wpa_supplicant/mesh.c
17 @@ -336,14 +336,14 @@ static int wpa_supplicant_mesh_init(stru
18  
19         wpa_supplicant_conf_ap_ht(wpa_s, ssid, conf);
20  
21 -       if (hostapd_setup_interface(ifmsh)) {
22 -               wpa_printf(MSG_ERROR,
23 -                          "Failed to initialize hostapd interface for mesh");
24 +       if (wpa_drv_init_mesh(wpa_s)) {
25 +               wpa_msg(wpa_s, MSG_ERROR, "Failed to init mesh in driver");
26                 return -1;
27         }
28  
29 -       if (wpa_drv_init_mesh(wpa_s)) {
30 -               wpa_msg(wpa_s, MSG_ERROR, "Failed to init mesh in driver");
31 +       if (hostapd_setup_interface(ifmsh)) {
32 +               wpa_printf(MSG_ERROR,
33 +                          "Failed to initialize hostapd interface for mesh");
34                 return -1;
35         }
36