Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 159149
b: refs/heads/master
c: 25e83c4
h: refs/heads/master
i:
  159147: c9d65c1
v: v3
  • Loading branch information
Johannes Berg authored and John W. Linville committed Jul 24, 2009
1 parent 141961c commit 13a0549
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 20 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: d4b1a6876f99ae1886cd254f649506af6692ac9f
refs/heads/master: 25e83c490be421019997146bdec8645f5bcabcd1
40 changes: 21 additions & 19 deletions trunk/net/wireless/wext-sme.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,14 @@ int cfg80211_mgd_wext_siwfreq(struct net_device *dev,
cfg80211_lock_rdev(rdev);
wdev_lock(wdev);

if (wdev->wext.connect.channel == chan) {
err = 0;
goto out;
}

if (wdev->sme_state != CFG80211_SME_IDLE) {
bool event = true;

if (wdev->wext.connect.channel == chan) {
err = 0;
goto out;
}

/* if SSID set, we'll try right again, avoid event */
if (wdev->wext.connect.ssid_len)
event = false;
Expand Down Expand Up @@ -164,13 +165,14 @@ int cfg80211_mgd_wext_siwessid(struct net_device *dev,

err = 0;

if (wdev->wext.connect.ssid && len &&
len == wdev->wext.connect.ssid_len &&
memcmp(wdev->wext.connect.ssid, ssid, len) == 0)
goto out;

if (wdev->sme_state != CFG80211_SME_IDLE) {
bool event = true;

if (wdev->wext.connect.ssid && len &&
len == wdev->wext.connect.ssid_len &&
memcmp(wdev->wext.connect.ssid, ssid, len) == 0)
goto out;

/* if SSID set now, we'll try to connect, avoid event */
if (len)
event = false;
Expand Down Expand Up @@ -244,17 +246,17 @@ int cfg80211_mgd_wext_siwap(struct net_device *dev,
cfg80211_lock_rdev(wiphy_to_dev(wdev->wiphy));
wdev_lock(wdev);

err = 0;
/* both automatic */
if (!bssid && !wdev->wext.connect.bssid)
goto out;
if (wdev->sme_state != CFG80211_SME_IDLE) {
err = 0;
/* both automatic */
if (!bssid && !wdev->wext.connect.bssid)
goto out;

/* fixed already - and no change */
if (wdev->wext.connect.bssid && bssid &&
compare_ether_addr(bssid, wdev->wext.connect.bssid) == 0)
goto out;
/* fixed already - and no change */
if (wdev->wext.connect.bssid && bssid &&
compare_ether_addr(bssid, wdev->wext.connect.bssid) == 0)
goto out;

if (wdev->sme_state != CFG80211_SME_IDLE) {
err = __cfg80211_disconnect(wiphy_to_dev(wdev->wiphy),
dev, WLAN_REASON_DEAUTH_LEAVING,
false);
Expand Down

0 comments on commit 13a0549

Please sign in to comment.