From 4f6fab472c4c7c21d577f85fabec7628d4a05637 Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Mon, 31 Mar 2008 19:23:02 +0200 Subject: 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 Signed-off-by: John W. Linville --- net/mac80211/cfg.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'net/mac80211/cfg.c') diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index fbd462c..5f8db5c 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); -- cgit v1.1