diff mbox series

[v6,07/15] mesh: set interface type to mesh before setting interface

Message ID 8982cbc924912bbf4e147d622d6ac0d259c5f69a.1527814610.git.peter.oh@bowerswilkins.com
State Deferred
Headers show
Series mesh: enable DFS channels in mesh mode | expand

Commit Message

Peter Oh June 1, 2018, 1:02 a.m. UTC
From: Peter Oh <peter.oh@bowerswilkins.com>

Correct interface type is required to start DFS CAC that can be
triggered during interface setup.

Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
---
 wpa_supplicant/mesh.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/wpa_supplicant/mesh.c b/wpa_supplicant/mesh.c
index 7373d1d..e99eb7b 100644
--- a/wpa_supplicant/mesh.c
+++ b/wpa_supplicant/mesh.c
@@ -341,17 +341,17 @@  static int wpa_supplicant_mesh_init(struct wpa_supplicant *wpa_s,
 
 	wpa_supplicant_conf_ap_ht(wpa_s, ssid, conf);
 
-	if (hostapd_setup_interface(ifmsh)) {
-		wpa_printf(MSG_ERROR,
-			   "Failed to initialize hostapd interface for mesh");
-		return -1;
-	}
-
 	if (wpa_drv_init_mesh(wpa_s)) {
 		wpa_msg(wpa_s, MSG_ERROR, "Failed to init mesh in driver");
 		return -1;
 	}
 
+	if (hostapd_setup_interface(ifmsh)) {
+		wpa_printf(MSG_ERROR,
+			   "Failed to initialize hostapd interface for mesh");
+		return -1;
+	}
+
 	return 0;
 out_free:
 	wpa_supplicant_mesh_deinit(wpa_s);