summaryrefslogtreecommitdiff
path: root/net/wireless/sme.c
diff options
context:
space:
mode:
authorMilosz Tanski <milosz@adfin.com>2013-09-06 16:41:20 +0000
committerMilosz Tanski <milosz@adfin.com>2013-09-06 16:41:20 +0000
commitcd0a2df681ec2af45f50c555c2a39dc92a4dff71 (patch)
tree35d2278a9494582025f3dac08feb2266adef6a4d /net/wireless/sme.c
parentc35455791c1131e7ccbf56ea6fbdd562401c2ce2 (diff)
parent5a6f282a2052bb13171b53f03b34501cf72c33f1 (diff)
Merge tag 'fscache-fixes-for-ceph' into wip-fscache
Patches for Ceph FS-Cache support
Diffstat (limited to 'net/wireless/sme.c')
-rw-r--r--net/wireless/sme.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/net/wireless/sme.c b/net/wireless/sme.c
index 81c8a10d743c..20e86a95dc4e 100644
--- a/net/wireless/sme.c
+++ b/net/wireless/sme.c
@@ -976,21 +976,19 @@ int cfg80211_disconnect(struct cfg80211_registered_device *rdev,
struct net_device *dev, u16 reason, bool wextev)
{
struct wireless_dev *wdev = dev->ieee80211_ptr;
- int err;
+ int err = 0;
ASSERT_WDEV_LOCK(wdev);
kfree(wdev->connect_keys);
wdev->connect_keys = NULL;
- if (wdev->conn) {
+ if (wdev->conn)
err = cfg80211_sme_disconnect(wdev, reason);
- } else if (!rdev->ops->disconnect) {
+ else if (!rdev->ops->disconnect)
cfg80211_mlme_down(rdev, dev);
- err = 0;
- } else {
+ else if (wdev->current_bss)
err = rdev_disconnect(rdev, dev, reason);
- }
return err;
}