cfg80211: properly send NL80211_ATTR_DISCONNECTED_BY_AP in disconnect
authorJohannes Berg <johannes.berg@intel.com>
Fri, 22 May 2015 14:22:20 +0000 (16:22 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 26 May 2015 13:21:27 +0000 (15:21 +0200)
commit80279fb7ba5b71981a60988b0307afa43f78f6b1
treef209256191424c26c5e72fedb36ec90a398b19c3
parentc5a71688e1e56e155fb79b8d699322f4f0793cc8
cfg80211: properly send NL80211_ATTR_DISCONNECTED_BY_AP in disconnect

When we disconnect from the AP, drivers call cfg80211_disconnect().
This doesn't know whether the disconnection was initiated locally
or by the AP though, which can cause problems with the supplicant,
for example with WPS. This issue obviously doesn't show up with any
mac80211 based driver since mac80211 doesn't call this function.

Fix this by requiring drivers to indicate whether the disconnect is
locally generated or not. I've tried to update the drivers, but may
not have gotten the values correct, and some drivers may currently
not be able to report correct values. In case of doubt I left it at
false, which is the current behaviour.

For libertas, make adjustments as indicated by Dan Williams.

Reported-by: Matthieu Mauger <matthieux.mauger@intel.com>
Tested-by: Matthieu Mauger <matthieux.mauger@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
16 files changed:
drivers/net/wireless/ath/ath6kl/cfg80211.c
drivers/net/wireless/ath/wil6210/main.c
drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c
drivers/net/wireless/libertas/cfg.c
drivers/net/wireless/libertas/cfg.h
drivers/net/wireless/libertas/cmd.h
drivers/net/wireless/libertas/cmdresp.c
drivers/net/wireless/mwifiex/join.c
drivers/net/wireless/mwifiex/sta_event.c
drivers/net/wireless/rndis_wlan.c
drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c
drivers/staging/wlan-ng/cfg80211.c
include/net/cfg80211.h
net/wireless/core.h
net/wireless/sme.c
net/wireless/util.c