aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/mesh_mpm.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2016-01-06 15:16:24 (GMT)
committerJouni Malinen <j@w1.fi>2016-01-06 15:50:15 (GMT)
commitb5f5c32412718c721127742c9ce80d0f2233eb4b (patch)
tree44d07072802588b4a0bc97ad90d4465c50186329 /wpa_supplicant/mesh_mpm.c
parent7d41907bd9f9521baeae1ed2e6afc70d595fe465 (diff)
downloadhostap-b5f5c32412718c721127742c9ce80d0f2233eb4b.zip
hostap-b5f5c32412718c721127742c9ce80d0f2233eb4b.tar.gz
hostap-b5f5c32412718c721127742c9ce80d0f2233eb4b.tar.bz2
mesh: Add some more details to MPM debug messages
This makes it easier to follow the debug log when trying to figure out issues with mesh peering exchange. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'wpa_supplicant/mesh_mpm.c')
-rw-r--r--wpa_supplicant/mesh_mpm.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/wpa_supplicant/mesh_mpm.c b/wpa_supplicant/mesh_mpm.c
index 21b908a..92e47aa 100644
--- a/wpa_supplicant/mesh_mpm.c
+++ b/wpa_supplicant/mesh_mpm.c
@@ -43,6 +43,7 @@ enum plink_event {
};
static const char * const mplstate[] = {
+ [0] = "UNINITIALIZED",
[PLINK_LISTEN] = "LISTEN",
[PLINK_OPEN_SENT] = "OPEN_SENT",
[PLINK_OPEN_RCVD] = "OPEN_RCVD",
@@ -360,6 +361,9 @@ static void mesh_mpm_send_plink_action(struct wpa_supplicant *wpa_s,
goto fail;
}
+ wpa_msg(wpa_s, MSG_DEBUG, "Mesh MPM: Sending peering frame type %d to "
+ MACSTR " (my_lid=0x%x peer_lid=0x%x)",
+ type, MAC2STR(sta->addr), sta->my_lid, sta->peer_lid);
ret = wpa_drv_send_action(wpa_s, wpa_s->assoc_freq, 0,
sta->addr, wpa_s->own_addr, wpa_s->own_addr,
wpabuf_head(buf), wpabuf_len(buf), 0);
@@ -380,6 +384,9 @@ void wpa_mesh_set_plink_state(struct wpa_supplicant *wpa_s,
struct hostapd_sta_add_params params;
int ret;
+ wpa_msg(wpa_s, MSG_DEBUG, "MPM set " MACSTR " from %s into %s",
+ MAC2STR(sta->addr), mplstate[sta->plink_state],
+ mplstate[state]);
sta->plink_state = state;
os_memset(&params, 0, sizeof(params));
@@ -387,8 +394,6 @@ void wpa_mesh_set_plink_state(struct wpa_supplicant *wpa_s,
params.plink_state = state;
params.set = 1;
- wpa_msg(wpa_s, MSG_DEBUG, "MPM set " MACSTR " into %s",
- MAC2STR(sta->addr), mplstate[state]);
ret = wpa_drv_sta_add(wpa_s, &params);
if (ret) {
wpa_msg(wpa_s, MSG_ERROR, "Driver failed to set " MACSTR