Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mac80211: print reason code for deauth/dissoc frames

The patch prints reason code for deauth/dissoc frames to give users
more ideas what's happened for the disconnection.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

authored by

Zhu Yi and committed by
John W. Linville
97c8b013 db4186cf

+4 -2
+4 -2
net/mac80211/mlme.c
··· 1123 1123 reason_code = le16_to_cpu(mgmt->u.deauth.reason_code); 1124 1124 1125 1125 if (ifsta->flags & IEEE80211_STA_AUTHENTICATED) 1126 - printk(KERN_DEBUG "%s: deauthenticated\n", sdata->dev->name); 1126 + printk(KERN_DEBUG "%s: deauthenticated (Reason: %u)\n", 1127 + sdata->dev->name, reason_code); 1127 1128 1128 1129 if (ifsta->state == IEEE80211_STA_MLME_AUTHENTICATE || 1129 1130 ifsta->state == IEEE80211_STA_MLME_ASSOCIATE || ··· 1155 1154 reason_code = le16_to_cpu(mgmt->u.disassoc.reason_code); 1156 1155 1157 1156 if (ifsta->flags & IEEE80211_STA_ASSOCIATED) 1158 - printk(KERN_DEBUG "%s: disassociated\n", sdata->dev->name); 1157 + printk(KERN_DEBUG "%s: disassociated (Reason: %u)\n", 1158 + sdata->dev->name, reason_code); 1159 1159 1160 1160 if (ifsta->state == IEEE80211_STA_MLME_ASSOCIATED) { 1161 1161 ifsta->state = IEEE80211_STA_MLME_ASSOCIATE;