From cebb05753737d34bd315fb17db30cdab61f0c8a1 Mon Sep 17 00:00:00 2001 From: avos Date: Wed, 20 Apr 2016 20:30:18 +0000 Subject: net80211: provide descriptions for reason codes Add text description for deauth/disassoc/etc reason codes in addition to 'reason: ' string. Reviewed by: adrian Obtained from: IEEE Std 802.11-2012, 8.4.1.7 "Reason Code field" Differential Revision: https://reviews.freebsd.org/D5367 --- sys/net80211/ieee80211_ioctl.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'sys/net80211/ieee80211_ioctl.c') diff --git a/sys/net80211/ieee80211_ioctl.c b/sys/net80211/ieee80211_ioctl.c index 3a362df..919471a 100644 --- a/sys/net80211/ieee80211_ioctl.c +++ b/sys/net80211/ieee80211_ioctl.c @@ -1281,18 +1281,20 @@ mlmedebug(struct ieee80211vap *vap, const uint8_t mac[IEEE80211_ADDR_LEN], if (op == IEEE80211_MLME_AUTH) { IEEE80211_NOTE_MAC(vap, IEEE80211_MSG_IOCTL | IEEE80211_MSG_STATE | IEEE80211_MSG_AUTH, mac, - "station authenticate %s via MLME (reason %d)", + "station authenticate %s via MLME (reason: %d (%s))", reason == IEEE80211_STATUS_SUCCESS ? "ACCEPT" : "REJECT", - reason); + reason, ieee80211_reason_to_string(reason)); } else if (!(IEEE80211_MLME_ASSOC <= op && op <= IEEE80211_MLME_AUTH)) { IEEE80211_NOTE_MAC(vap, IEEE80211_MSG_ANY, mac, - "unknown MLME request %d (reason %d)", op, reason); + "unknown MLME request %d (reason: %d (%s))", op, reason, + ieee80211_reason_to_string(reason)); } else if (reason == IEEE80211_STATUS_SUCCESS) { IEEE80211_NOTE_MAC(vap, ops[op].mask, mac, "station %s via MLME", ops[op].opstr); } else { IEEE80211_NOTE_MAC(vap, ops[op].mask, mac, - "station %s via MLME (reason %d)", ops[op].opstr, reason); + "station %s via MLME (reason: %d (%s))", ops[op].opstr, + reason, ieee80211_reason_to_string(reason)); } #endif /* IEEE80211_DEBUG */ } -- cgit v1.1