From 4e0990dc88a811c351709aa169e1ed072347625e Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Thu, 27 Nov 2014 17:02:12 +0200 Subject: [PATCH] mesh: Send peering close message before leaving mesh This is needed to allow proper Action frame transmission to work without having to claim these to be offchannel operations. Signed-off-by: Jouni Malinen --- wpa_supplicant/mesh.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wpa_supplicant/mesh.c b/wpa_supplicant/mesh.c index 8cdf18971..07d47ce33 100644 --- a/wpa_supplicant/mesh.c +++ b/wpa_supplicant/mesh.c @@ -369,14 +369,15 @@ int wpa_supplicant_leave_mesh(struct wpa_supplicant *wpa_s) wpa_msg(wpa_s, MSG_INFO, "leaving mesh"); + /* Need to send peering close messages first */ + wpa_supplicant_mesh_deinit(wpa_s); + ret = wpa_drv_leave_mesh(wpa_s); if (ret) wpa_msg(wpa_s, MSG_ERROR, "mesh leave error=%d", ret); wpa_drv_set_operstate(wpa_s, 1); - wpa_supplicant_mesh_deinit(wpa_s); - return ret; }