diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2008-03-31 19:23:02 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-04-01 23:14:10 +0200 |
commit | 4f6fab472c4c7c21d577f85fabec7628d4a05637 (patch) | |
tree | 0949dffadb0b715053e4d7148ebcabe930b39361 /net/mac80211/cfg.c | |
parent | mac80211: automatically free sta struct when insertion fails (diff) | |
download | linux-4f6fab472c4c7c21d577f85fabec7628d4a05637.tar.xz linux-4f6fab472c4c7c21d577f85fabec7628d4a05637.zip |
mac80211: clean up sta_info_destroy() users wrt. RCU/locking
Calling sta_info_destroy() doesn't require RCU-synchronisation
before-hand because it does that internally. However, it does
require rtnl-locking so insert that where necessary.
Also clean up the code doing it internally to be a bit clearer and
not synchronize twice if keys are configured.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/cfg.c')
-rw-r--r-- | net/mac80211/cfg.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index fbd462c78e18..5f8db5cab65d 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -700,11 +700,7 @@ static int ieee80211_del_station(struct wiphy *wiphy, struct net_device *dev, return -ENOENT; sta_info_unlink(&sta); - - if (sta) { - synchronize_rcu(); - sta_info_destroy(sta); - } + sta_info_destroy(sta); } else sta_info_flush(local, sdata); |