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 <jouni@qca.qualcomm.com>
This commit is contained in:
Jouni Malinen 2014-11-27 17:02:12 +02:00 committed by Jouni Malinen
parent 7a94120ea9
commit 4e0990dc88

View file

@ -369,14 +369,15 @@ int wpa_supplicant_leave_mesh(struct wpa_supplicant *wpa_s)
wpa_msg(wpa_s, MSG_INFO, "leaving mesh"); 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); ret = wpa_drv_leave_mesh(wpa_s);
if (ret) if (ret)
wpa_msg(wpa_s, MSG_ERROR, "mesh leave error=%d", ret); wpa_msg(wpa_s, MSG_ERROR, "mesh leave error=%d", ret);
wpa_drv_set_operstate(wpa_s, 1); wpa_drv_set_operstate(wpa_s, 1);
wpa_supplicant_mesh_deinit(wpa_s);
return ret; return ret;
} }