On Mon, Apr 15, 2019 at 12:20:05PM -0700, akhouderchah@xxxxxxxxxxxx wrote: > Logs involving 802.11 reason codes output the reason code value, but > do not provide any explanation of what the value means. This change > provides a terse explanation of each reason code using the latter part > of the reason code #define names. Thanks, both patches applied. Though, I had to drop these parts: > diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c > @@ -2988,8 +2988,8 @@ static void wpa_supplicant_event_disassoc(struct wpa_supplicant *wpa_s, > wpa_msg(wpa_s, MSG_INFO, WPA_EVENT_DISCONNECTED "bssid=" MACSTR > - " reason=%d%s", > - MAC2STR(bssid), reason_code, > + " reason=%u (%s)%s", > + MAC2STR(bssid), reason_code, reason2str(reason_code), > locally_generated ? " locally_generated=1" : ""); > diff --git a/wpa_supplicant/sme.c b/wpa_supplicant/sme.c > @@ -1357,11 +1357,11 @@ void sme_event_auth(struct wpa_supplicant *wpa_s, union wpa_event_data *data) > + u16 reason = WLAN_REASON_DEAUTH_LEAVING; > wpa_msg(wpa_s, MSG_INFO, WPA_EVENT_DISCONNECTED "bssid=" > MACSTR > - " reason=%d locally_generated=1", > - MAC2STR(wpa_s->pending_bssid), > - WLAN_REASON_DEAUTH_LEAVING); > + " reason=%u (%s) locally_generated=1", > + MAC2STR(wpa_s->pending_bssid), reason, reason2str(reason)); Those are INFO level events with wpa_ctrl.h defined prefix, i.e., something that is likely used by existing upper layer components. The changes in the parameter strings to replace "reason=%u" with "reason=%u (%s)" could result in unexpected behavior in this event messages targeted at programs parsing them rather than for humans. -- Jouni Malinen PGP id EFC895FA _______________________________________________ Hostap mailing list Hostap@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/hostap