if (sta) {
if (sta->plink_state == PLINK_ESTAB) {
hapd->num_plinks--;
- wpa_msg(wpa_s, MSG_INFO, MESH_PEER_DISCONNECTED MACSTR,
- MAC2STR(sta->addr));
+ wpas_notify_mesh_peer_disconnected(
+ wpa_s, sta->addr, WLAN_REASON_UNSPECIFIED);
}
wpa_mesh_set_plink_state(wpa_s, sta, PLINK_HOLDING);
mesh_mpm_send_plink_action(wpa_s, sta, PLINK_CLOSE, reason);
peer_add_timer(wpa_s, NULL);
eloop_cancel_timeout(plink_timer, wpa_s, sta);
- /* Send ctrl event */
- wpa_msg(wpa_s, MSG_INFO, MESH_PEER_CONNECTED MACSTR,
- MAC2STR(sta->addr));
-
- /* Send D-Bus event */
wpas_notify_mesh_peer_connected(wpa_s, sta->addr);
}
" closed with reason %d",
MAC2STR(sta->addr), reason);
- wpa_msg(wpa_s, MSG_INFO, MESH_PEER_DISCONNECTED MACSTR,
- MAC2STR(sta->addr));
-
- /* Send D-Bus event */
wpas_notify_mesh_peer_disconnected(wpa_s, sta->addr,
reason);
if (sta->plink_state == PLINK_ESTAB) {
hapd->num_plinks--;
- wpa_msg(wpa_s, MSG_INFO, MESH_PEER_DISCONNECTED MACSTR,
- MAC2STR(sta->addr));
+ wpas_notify_mesh_peer_disconnected(
+ wpa_s, sta->addr, WLAN_REASON_UNSPECIFIED);
}
eloop_cancel_timeout(plink_timer, ELOOP_ALL_CTX, sta);
eloop_cancel_timeout(mesh_auth_timer, ELOOP_ALL_CTX, sta);
if (wpa_s->p2p_mgmt)
return;
+ wpa_msg(wpa_s, MSG_INFO, MESH_PEER_CONNECTED MACSTR,
+ MAC2STR(peer_addr));
wpas_dbus_signal_mesh_peer_connected(wpa_s, peer_addr);
}
if (wpa_s->p2p_mgmt)
return;
+ wpa_msg(wpa_s, MSG_INFO, MESH_PEER_DISCONNECTED MACSTR,
+ MAC2STR(peer_addr));
wpas_dbus_signal_mesh_peer_disconnected(wpa_s, peer_addr, reason_code);
}