mac80211: Print text for disassociation reason
authorArkadiusz Miskiewicz <a.miskiewicz@gmail.com>
Wed, 15 Feb 2017 13:21:27 +0000 (14:21 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 5 Oct 2019 10:30:09 +0000 (12:30 +0200)
[ Upstream commit 68506e9af132a6b5735c1dd4b11240da0cf5eeae ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/mac80211/mlme.c

index f462f026fc6aa0ae9146d04ab5838c6382fe7a20..090e2aa8630e8048870b8d2f38382a9b694cb568 100644 (file)
@@ -2869,8 +2869,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);