cfg80211: fix a locking bug

The cfg80211_sme_disassoc() function is already holding
a lock here that cfg80211_mlme_deauth() would take, so
it needs to use __cfg80211_mlme_deauth() instead.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
Johannes Berg 2009-07-10 02:45:38 +02:00 committed by John W. Linville
parent b291ba1118
commit ec3f149017

View File

@ -826,8 +826,8 @@ void cfg80211_sme_disassoc(struct net_device *dev, int idx)
return;
memcpy(bssid, wdev->auth_bsses[idx]->pub.bssid, ETH_ALEN);
if (cfg80211_mlme_deauth(rdev, dev, bssid,
NULL, 0, WLAN_REASON_DEAUTH_LEAVING)) {
if (__cfg80211_mlme_deauth(rdev, dev, bssid,
NULL, 0, WLAN_REASON_DEAUTH_LEAVING)) {
/* whatever -- assume gone anyway */
cfg80211_unhold_bss(wdev->auth_bsses[idx]);
cfg80211_put_bss(&wdev->auth_bsses[idx]->pub);