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

nl80211: send deauth reason if locally generated

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>

authored by

David Spinadel and committed by
Johannes Berg
86b6c465 e7881bd5

+1 -1
+1 -1
net/wireless/nl80211.c
··· 13963 13963 13964 13964 if (nla_put_u32(msg, NL80211_ATTR_WIPHY, rdev->wiphy_idx) || 13965 13965 nla_put_u32(msg, NL80211_ATTR_IFINDEX, netdev->ifindex) || 13966 - (from_ap && reason && 13966 + (reason && 13967 13967 nla_put_u16(msg, NL80211_ATTR_REASON_CODE, reason)) || 13968 13968 (from_ap && 13969 13969 nla_put_flag(msg, NL80211_ATTR_DISCONNECTED_BY_AP)) ||