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>
This commit is contained in:
parent
7d41907bd9
commit
b5f5c32412
1 changed files with 7 additions and 2 deletions
|
@ -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(¶ms, 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, ¶ms);
|
||||
if (ret) {
|
||||
wpa_msg(wpa_s, MSG_ERROR, "Driver failed to set " MACSTR
|
||||
|
|
Loading…
Reference in a new issue