mac80211: Print text for disassociation reason
authorArkadiusz Miskiewicz <a.miskiewicz@gmail.com>
Wed, 15 Feb 2017 13:21:27 +0000 (14:21 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 6 Mar 2017 08:21:42 +0000 (09:21 +0100)
When disassociation happens only numeric reason is printed
in ieee80211_rx_mgmt_disassoc(). Add text variant, too.

Signed-off-by: Arkadiusz Miƛkiewicz <arekm@maven.pl>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/mlme.c

index 23986934d7af256f02f126e89d5d6fd028502f4a..1568a74757bcb0ee15d48a764aa563ca86f2a790 100644 (file)
@@ -2797,8 +2797,9 @@ static void ieee80211_rx_mgmt_disassoc(struct ieee80211_sub_if_data *sdata,
 
        reason_code = le16_to_cpu(mgmt->u.disassoc.reason_code);
 
-       sdata_info(sdata, "disassociated from %pM (Reason: %u)\n",
-                  mgmt->sa, reason_code);
+       sdata_info(sdata, "disassociated from %pM (Reason: %u=%s)\n",
+                  mgmt->sa, reason_code,
+                  ieee80211_get_reason_code_string(reason_code));
 
        ieee80211_set_disassoc(sdata, 0, 0, false, NULL);