aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/cfg.c
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2010-07-29 14:47:07 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-07-29 14:47:07 -0400
commitae3568adf42d5d3bb3cfa505b94351c5d1ce4924 (patch)
tree112865a6e6b1e4ddf70362f3efb295c495ec85b9 /net/mac80211/cfg.c
parent7f3e01fee41a322747db2d7574516d9fbd3785c0 (diff)
parentb7753c8cd51dce67a0b152efb456a21ff1cc241b (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem
Diffstat (limited to 'net/mac80211/cfg.c')
-rw-r--r--net/mac80211/cfg.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index db4d9340c846..29ac8e1a509e 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -158,7 +158,7 @@ static int ieee80211_add_key(struct wiphy *wiphy, struct net_device *dev,
158 if (mac_addr) { 158 if (mac_addr) {
159 sta = sta_info_get_bss(sdata, mac_addr); 159 sta = sta_info_get_bss(sdata, mac_addr);
160 if (!sta) { 160 if (!sta) {
161 ieee80211_key_free(key); 161 ieee80211_key_free(sdata->local, key);
162 err = -ENOENT; 162 err = -ENOENT;
163 goto out_unlock; 163 goto out_unlock;
164 } 164 }
@@ -192,7 +192,7 @@ static int ieee80211_del_key(struct wiphy *wiphy, struct net_device *dev,
192 goto out_unlock; 192 goto out_unlock;
193 193
194 if (sta->key) { 194 if (sta->key) {
195 ieee80211_key_free(sta->key); 195 ieee80211_key_free(sdata->local, sta->key);
196 WARN_ON(sta->key); 196 WARN_ON(sta->key);
197 ret = 0; 197 ret = 0;
198 } 198 }
@@ -205,7 +205,7 @@ static int ieee80211_del_key(struct wiphy *wiphy, struct net_device *dev,
205 goto out_unlock; 205 goto out_unlock;
206 } 206 }
207 207
208 ieee80211_key_free(sdata->keys[key_idx]); 208 ieee80211_key_free(sdata->local, sdata->keys[key_idx]);
209 WARN_ON(sdata->keys[key_idx]); 209 WARN_ON(sdata->keys[key_idx]);
210 210
211 ret = 0; 211 ret = 0;
@@ -324,15 +324,10 @@ static int ieee80211_config_default_mgmt_key(struct wiphy *wiphy,
324 struct net_device *dev, 324 struct net_device *dev,
325 u8 key_idx) 325 u8 key_idx)
326{ 326{
327 struct ieee80211_sub_if_data *sdata; 327 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
328
329 rcu_read_lock();
330 328
331 sdata = IEEE80211_DEV_TO_SUB_IF(dev);
332 ieee80211_set_default_mgmt_key(sdata, key_idx); 329 ieee80211_set_default_mgmt_key(sdata, key_idx);
333 330
334 rcu_read_unlock();
335
336 return 0; 331 return 0;
337} 332}
338 333