aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2009-12-30 15:25:08 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-12-30 15:25:08 -0500
commit891dc5e73783eeabd2a704a9425e2a199b39c9f9 (patch)
tree9b4478941c486d47a71bfce455b896c5dda7e811 /net
parente1781ed33a8809c58ad6c3b6d432d656446efa43 (diff)
parent55afc80b2ab100618c17af77915f75307b6bd5d1 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
Conflicts: drivers/net/wireless/libertas/scan.c
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/ibss.c4
-rw-r--r--net/mac80211/tx.c4
-rw-r--r--net/mac80211/util.c12
-rw-r--r--net/wireless/mlme.c13
-rw-r--r--net/wireless/scan.c13
5 files changed, 41 insertions, 5 deletions
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
index 621a54c0573a..5bcde4c3fba1 100644
--- a/net/mac80211/ibss.c
+++ b/net/mac80211/ibss.c
@@ -387,6 +387,7 @@ static void ieee80211_rx_bss_info(struct ieee80211_sub_if_data *sdata,
387struct sta_info *ieee80211_ibss_add_sta(struct ieee80211_sub_if_data *sdata, 387struct sta_info *ieee80211_ibss_add_sta(struct ieee80211_sub_if_data *sdata,
388 u8 *bssid,u8 *addr, u32 supp_rates) 388 u8 *bssid,u8 *addr, u32 supp_rates)
389{ 389{
390 struct ieee80211_if_ibss *ifibss = &sdata->u.ibss;
390 struct ieee80211_local *local = sdata->local; 391 struct ieee80211_local *local = sdata->local;
391 struct sta_info *sta; 392 struct sta_info *sta;
392 int band = local->hw.conf.channel->band; 393 int band = local->hw.conf.channel->band;
@@ -402,6 +403,9 @@ struct sta_info *ieee80211_ibss_add_sta(struct ieee80211_sub_if_data *sdata,
402 return NULL; 403 return NULL;
403 } 404 }
404 405
406 if (ifibss->state == IEEE80211_IBSS_MLME_SEARCH)
407 return NULL;
408
405 if (compare_ether_addr(bssid, sdata->u.ibss.bssid)) 409 if (compare_ether_addr(bssid, sdata->u.ibss.bssid))
406 return NULL; 410 return NULL;
407 411
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 1593a2ffd67a..7bba49d2b6ca 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1418,6 +1418,10 @@ static bool need_dynamic_ps(struct ieee80211_local *local)
1418 if (!local->ps_sdata) 1418 if (!local->ps_sdata)
1419 return false; 1419 return false;
1420 1420
1421 /* No point if we're going to suspend */
1422 if (local->quiescing)
1423 return false;
1424
1421 return true; 1425 return true;
1422} 1426}
1423 1427
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index 4b930308b1fb..7e38858a9280 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -1084,7 +1084,19 @@ int ieee80211_reconfig(struct ieee80211_local *local)
1084 1084
1085 /* restart hardware */ 1085 /* restart hardware */
1086 if (local->open_count) { 1086 if (local->open_count) {
1087 /*
1088 * Upon resume hardware can sometimes be goofy due to
1089 * various platform / driver / bus issues, so restarting
1090 * the device may at times not work immediately. Propagate
1091 * the error.
1092 */
1087 res = drv_start(local); 1093 res = drv_start(local);
1094 if (res) {
1095 WARN(local->suspended, "Harware became unavailable "
1096 "upon resume. This is could be a software issue"
1097 "prior to suspend or a harware issue\n");
1098 return res;
1099 }
1088 1100
1089 ieee80211_led_radio(local, true); 1101 ieee80211_led_radio(local, true);
1090 } 1102 }
diff --git a/net/wireless/mlme.c b/net/wireless/mlme.c
index 3dba19e17271..94d151f6f73e 100644
--- a/net/wireless/mlme.c
+++ b/net/wireless/mlme.c
@@ -93,7 +93,18 @@ void cfg80211_send_rx_assoc(struct net_device *dev, const u8 *buf, size_t len)
93 } 93 }
94 } 94 }
95 95
96 WARN_ON(!bss); 96 /*
97 * We might be coming here because the driver reported
98 * a successful association at the same time as the
99 * user requested a deauth. In that case, we will have
100 * removed the BSS from the auth_bsses list due to the
101 * deauth request when the assoc response makes it. If
102 * the two code paths acquire the lock the other way
103 * around, that's just the standard situation of a
104 * deauth being requested while connected.
105 */
106 if (!bss)
107 goto out;
97 } else if (wdev->conn) { 108 } else if (wdev->conn) {
98 cfg80211_sme_failed_assoc(wdev); 109 cfg80211_sme_failed_assoc(wdev);
99 /* 110 /*
diff --git a/net/wireless/scan.c b/net/wireless/scan.c
index 12dfa62aad18..0c2cbbebca95 100644
--- a/net/wireless/scan.c
+++ b/net/wireless/scan.c
@@ -601,7 +601,7 @@ int cfg80211_wext_siwscan(struct net_device *dev,
601 struct cfg80211_registered_device *rdev; 601 struct cfg80211_registered_device *rdev;
602 struct wiphy *wiphy; 602 struct wiphy *wiphy;
603 struct iw_scan_req *wreq = NULL; 603 struct iw_scan_req *wreq = NULL;
604 struct cfg80211_scan_request *creq; 604 struct cfg80211_scan_request *creq = NULL;
605 int i, err, n_channels = 0; 605 int i, err, n_channels = 0;
606 enum ieee80211_band band; 606 enum ieee80211_band band;
607 607
@@ -694,8 +694,10 @@ int cfg80211_wext_siwscan(struct net_device *dev,
694 /* translate "Scan for SSID" request */ 694 /* translate "Scan for SSID" request */
695 if (wreq) { 695 if (wreq) {
696 if (wrqu->data.flags & IW_SCAN_THIS_ESSID) { 696 if (wrqu->data.flags & IW_SCAN_THIS_ESSID) {
697 if (wreq->essid_len > IEEE80211_MAX_SSID_LEN) 697 if (wreq->essid_len > IEEE80211_MAX_SSID_LEN) {
698 return -EINVAL; 698 err = -EINVAL;
699 goto out;
700 }
699 memcpy(creq->ssids[0].ssid, wreq->essid, wreq->essid_len); 701 memcpy(creq->ssids[0].ssid, wreq->essid, wreq->essid_len);
700 creq->ssids[0].ssid_len = wreq->essid_len; 702 creq->ssids[0].ssid_len = wreq->essid_len;
701 } 703 }
@@ -707,12 +709,15 @@ int cfg80211_wext_siwscan(struct net_device *dev,
707 err = rdev->ops->scan(wiphy, dev, creq); 709 err = rdev->ops->scan(wiphy, dev, creq);
708 if (err) { 710 if (err) {
709 rdev->scan_req = NULL; 711 rdev->scan_req = NULL;
710 kfree(creq); 712 /* creq will be freed below */
711 } else { 713 } else {
712 nl80211_send_scan_start(rdev, dev); 714 nl80211_send_scan_start(rdev, dev);
715 /* creq now owned by driver */
716 creq = NULL;
713 dev_hold(dev); 717 dev_hold(dev);
714 } 718 }
715 out: 719 out:
720 kfree(creq);
716 cfg80211_unlock_rdev(rdev); 721 cfg80211_unlock_rdev(rdev);
717 return err; 722 return err;
718} 723}