summaryrefslogtreecommitdiffstats
path: root/net/mac80211/mlme.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-01-20 07:55:24 -0500
committerJohn W. Linville <linville@tuxdriver.com>2012-02-06 14:50:37 -0500
commit7852e36186d2a1983c215836d7e3d7b8927c930d (patch)
tree191ab7c06b1ab871b95c1d732e9ca67482dbce9d /net/mac80211/mlme.c
parenta4ec45a421b80bc36fd37578accf081f32527a7f (diff)
mac80211: remove dummy STA support
The dummy STA support was added because I didn't want to change the driver API at the time. Now that we have state transitions triggering station add/remove in the driver, we only call add once a station reaches ASSOCIATED, so we can remove the dummy station stuff again. While at it, tighten the RX check and accept only port control (EAP) frames from the AP station if it's not associated yet -- in other cases there's no race. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r--net/mac80211/mlme.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 40b929d57a97..d04811a29cdf 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -1581,7 +1581,7 @@ static bool ieee80211_assoc_success(struct ieee80211_work *wk,
1581 * station info was already allocated and inserted before 1581 * station info was already allocated and inserted before
1582 * the association and should be available to us 1582 * the association and should be available to us
1583 */ 1583 */
1584 sta = sta_info_get_rx(sdata, cbss->bssid); 1584 sta = sta_info_get(sdata, cbss->bssid);
1585 if (WARN_ON(!sta)) { 1585 if (WARN_ON(!sta)) {
1586 mutex_unlock(&sdata->local->sta_mtx); 1586 mutex_unlock(&sdata->local->sta_mtx);
1587 return false; 1587 return false;
@@ -1648,14 +1648,7 @@ static bool ieee80211_assoc_success(struct ieee80211_work *wk,
1648 return false; 1648 return false;
1649 } 1649 }
1650 1650
1651 /* sta_info_reinsert will also unlock the mutex lock */ 1651 mutex_unlock(&sdata->local->sta_mtx);
1652 err = sta_info_reinsert(sta);
1653 sta = NULL;
1654 if (err) {
1655 printk(KERN_DEBUG "%s: failed to insert STA entry for"
1656 " the AP (error %d)\n", sdata->name, err);
1657 return false;
1658 }
1659 1652
1660 /* 1653 /*
1661 * Always handle WMM once after association regardless 1654 * Always handle WMM once after association regardless
@@ -2536,12 +2529,10 @@ static int ieee80211_pre_assoc(struct ieee80211_sub_if_data *sdata,
2536 if (!sta) 2529 if (!sta)
2537 return -ENOMEM; 2530 return -ENOMEM;
2538 2531
2539 sta->dummy = true;
2540
2541 err = sta_info_insert(sta); 2532 err = sta_info_insert(sta);
2542 sta = NULL; 2533 sta = NULL;
2543 if (err) { 2534 if (err) {
2544 printk(KERN_DEBUG "%s: failed to insert Dummy STA entry for" 2535 printk(KERN_DEBUG "%s: failed to insert STA entry for"
2545 " the AP (error %d)\n", sdata->name, err); 2536 " the AP (error %d)\n", sdata->name, err);
2546 return err; 2537 return err;
2547 } 2538 }