From 4f6fab472c4c7c21d577f85fabec7628d4a05637 Mon Sep 17 00:00:00 2001
From: Johannes Berg <johannes@sipsolutions.net>
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 <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
 net/mac80211/ieee80211_sta.c | 1 -
 1 file changed, 1 deletion(-)

(limited to 'net/mac80211/ieee80211_sta.c')

diff --git a/net/mac80211/ieee80211_sta.c b/net/mac80211/ieee80211_sta.c
index 00fde11..c5a47f8 100644
--- a/net/mac80211/ieee80211_sta.c
+++ b/net/mac80211/ieee80211_sta.c
@@ -939,7 +939,6 @@ static void ieee80211_associated(struct net_device *dev,
 	rcu_read_unlock();
 
 	if (disassoc && sta) {
-		synchronize_rcu();
 		rtnl_lock();
 		sta_info_destroy(sta);
 		rtnl_unlock();
-- 
cgit v1.1