mac80211: remove bogus rcu_read_lock()
authorJohannes Berg <johannes.berg@intel.com>
Thu, 22 Jul 2010 11:58:51 +0000 (13:58 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 26 Jul 2010 19:32:41 +0000 (15:32 -0400)
Another remnant of the previous key locking scheme
needs to be removed -- this causes a warning
otherwise as ieee80211_set_default_mgmt_key will
acquire a mutex.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/cfg.c

index 35b07ea0633aee8edc6d72a2d49ef874961c7def..db82da90df76c8802ba3f5ce841183833101212d 100644 (file)
@@ -324,15 +324,10 @@ static int ieee80211_config_default_mgmt_key(struct wiphy *wiphy,
                                             struct net_device *dev,
                                             u8 key_idx)
 {
-       struct ieee80211_sub_if_data *sdata;
-
-       rcu_read_lock();
+       struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
 
-       sdata = IEEE80211_DEV_TO_SUB_IF(dev);
        ieee80211_set_default_mgmt_key(sdata, key_idx);
 
-       rcu_read_unlock();
-
        return 0;
 }