summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorIlan Peer <ilan.peer@intel.com>2016-10-18 23:12:13 +0300
committerJohannes Berg <johannes.berg@intel.com>2016-10-19 12:15:38 +0200
commit0711d638786941ec02551dd9b4aa0d8341f7db5b (patch)
tree794affa9b2c804aeee70d8ff34bafd05c819a457 /net
parentf438ceb81d424cb90a5a1aad569056bd7c2ab4c5 (diff)
downloadlinux-0711d638786941ec02551dd9b4aa0d8341f7db5b.tar.bz2
cfg80211: allow aborting in-progress connection atttempts
On a disconnect request from userspace, cfg80211 currently calls called rdev_disconnect() only in case that 'current_bss' was set, i.e. connection had been established. Change this to allow the userspace call to succeed and call the driver's disconnect() method also while the connection attempt is in progress, to be able to abort attempts. Signed-off-by: Ilan Peer <ilan.peer@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> [change commit subject/message] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net')
-rw-r--r--net/wireless/sme.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/wireless/sme.c b/net/wireless/sme.c
index a77db333927e..2b5bb380414b 100644
--- a/net/wireless/sme.c
+++ b/net/wireless/sme.c
@@ -1088,7 +1088,7 @@ int cfg80211_disconnect(struct cfg80211_registered_device *rdev,
err = cfg80211_sme_disconnect(wdev, reason);
else if (!rdev->ops->disconnect)
cfg80211_mlme_down(rdev, dev);
- else if (wdev->current_bss)
+ else if (wdev->ssid_len)
err = rdev_disconnect(rdev, dev, reason);
return err;