Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 159736
b: refs/heads/master
c: ea416a7
h: refs/heads/master
v: v3
  • Loading branch information
Johannes Berg authored and John W. Linville committed Aug 20, 2009
1 parent 3866066 commit d39b63b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 86b2892a22a433e56e39e33bf353adc6cc4eabb2
refs/heads/master: ea416a793d2b611f22b42ba094fd2e5bd30fff43
9 changes: 9 additions & 0 deletions trunk/net/wireless/mlme.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,15 @@ void cfg80211_send_rx_assoc(struct net_device *dev, const u8 *buf, size_t len)
WARN_ON(!bss);
}

if (!wdev->conn && wdev->sme_state == CFG80211_SME_IDLE) {
/*
* This is for the userspace SME, the CONNECTING
* state will be changed to CONNECTED by
* __cfg80211_connect_result() below.
*/
wdev->sme_state = CFG80211_SME_CONNECTING;
}

/* this consumes one bss reference (unless bss is NULL) */
__cfg80211_connect_result(dev, mgmt->bssid, NULL, 0, ie, len - ieoffs,
status_code,
Expand Down
22 changes: 6 additions & 16 deletions trunk/net/wireless/sme.c
Original file line number Diff line number Diff line change
Expand Up @@ -351,15 +351,13 @@ void __cfg80211_connect_result(struct net_device *dev, const u8 *bssid,
if (WARN_ON(wdev->iftype != NL80211_IFTYPE_STATION))
return;

if (wdev->sme_state == CFG80211_SME_CONNECTED)
nl80211_send_roamed(wiphy_to_dev(wdev->wiphy), dev,
if (WARN_ON(wdev->sme_state != CFG80211_SME_CONNECTING))
return;

nl80211_send_connect_result(wiphy_to_dev(wdev->wiphy), dev,
bssid, req_ie, req_ie_len,
resp_ie, resp_ie_len, GFP_KERNEL);
else
nl80211_send_connect_result(wiphy_to_dev(wdev->wiphy), dev,
bssid, req_ie, req_ie_len,
resp_ie, resp_ie_len,
status, GFP_KERNEL);
resp_ie, resp_ie_len,
status, GFP_KERNEL);

#ifdef CONFIG_WIRELESS_EXT
if (wextev) {
Expand Down Expand Up @@ -392,13 +390,6 @@ void __cfg80211_connect_result(struct net_device *dev, const u8 *bssid,
wdev->current_bss = NULL;
}

if (status == WLAN_STATUS_SUCCESS &&
wdev->sme_state == CFG80211_SME_IDLE)
goto success;

if (wdev->sme_state != CFG80211_SME_CONNECTING)
return;

if (wdev->conn)
wdev->conn->state = CFG80211_CONN_IDLE;

Expand All @@ -412,7 +403,6 @@ void __cfg80211_connect_result(struct net_device *dev, const u8 *bssid,
return;
}

success:
if (!bss)
bss = cfg80211_get_bss(wdev->wiphy, NULL, bssid,
wdev->ssid, wdev->ssid_len,
Expand Down

0 comments on commit d39b63b

Please sign in to comment.