summaryrefslogtreecommitdiff
path: root/net/wireless
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2010-08-16 14:40:44 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-08-16 14:40:44 -0400
commit9714d315d28aef77a097fe905b25cc273c3d72ad (patch)
tree0ae1150b0723e925785ce774c3554f29fda050f6 /net/wireless
parent84c164a34ffe67908a932a2d641ec1a80c2d5435 (diff)
parent6ccf15a1a76d2ff915cdef6ae4d12d0170087118 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
Diffstat (limited to 'net/wireless')
-rw-r--r--net/wireless/mlme.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/net/wireless/mlme.c b/net/wireless/mlme.c
index e74a1a2119d3..d1a3fb99fdf2 100644
--- a/net/wireless/mlme.c
+++ b/net/wireless/mlme.c
@@ -843,13 +843,19 @@ int cfg80211_mlme_action(struct cfg80211_registered_device *rdev,
return -EINVAL;
if (mgmt->u.action.category != WLAN_CATEGORY_PUBLIC) {
/* Verify that we are associated with the destination AP */
+ wdev_lock(wdev);
+
if (!wdev->current_bss ||
memcmp(wdev->current_bss->pub.bssid, mgmt->bssid,
ETH_ALEN) != 0 ||
(wdev->iftype == NL80211_IFTYPE_STATION &&
memcmp(wdev->current_bss->pub.bssid, mgmt->da,
- ETH_ALEN) != 0))
+ ETH_ALEN) != 0)) {
+ wdev_unlock(wdev);
return -ENOTCONN;
+ }
+
+ wdev_unlock(wdev);
}
if (memcmp(mgmt->sa, dev->dev_addr, ETH_ALEN) != 0)