]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
mesh: Send peering close message before leaving mesh
authorJouni Malinen <jouni@qca.qualcomm.com>
Thu, 27 Nov 2014 15:02:12 +0000 (17:02 +0200)
committerJouni Malinen <j@w1.fi>
Thu, 27 Nov 2014 15:12:47 +0000 (17:12 +0200)
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 <jouni@qca.qualcomm.com>
wpa_supplicant/mesh.c

index 8cdf18971007930a736a686bd2527da6d5b1b3c3..07d47ce331c8e9ac3c50997ab59bf62bcd03c4e2 100644 (file)
@@ -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;
 }