]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
nl80211: send deauth reason if locally generated
authorDavid Spinadel <david.spinadel@intel.com>
Mon, 18 Dec 2017 10:14:05 +0000 (12:14 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 19 Dec 2017 09:13:01 +0000 (10:13 +0100)
Send disconnection reason code to user space even if it's locally
generated, since some tests that check reason code may fail because of
the current behavior.

Signed-off-by: David Spinadel <david.spinadel@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/nl80211.c

index e4522ad5f770c866f11f8e1962da056ff2cedbc5..e4dddfb64ced9a2195d6f8bf9668540dc3f2ad72 100644 (file)
@@ -13963,7 +13963,7 @@ void nl80211_send_disconnected(struct cfg80211_registered_device *rdev,
 
        if (nla_put_u32(msg, NL80211_ATTR_WIPHY, rdev->wiphy_idx) ||
            nla_put_u32(msg, NL80211_ATTR_IFINDEX, netdev->ifindex) ||
-           (from_ap && reason &&
+           (reason &&
             nla_put_u16(msg, NL80211_ATTR_REASON_CODE, reason)) ||
            (from_ap &&
             nla_put_flag(msg, NL80211_ATTR_DISCONNECTED_BY_AP)) ||