aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/cfg.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/cfg.c')
-rw-r--r--net/mac80211/cfg.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 2d1c1a5f3c51..6ecd5862735d 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -177,11 +177,11 @@ static int ieee80211_del_key(struct wiphy *wiphy, struct net_device *dev,
177 goto out_unlock; 177 goto out_unlock;
178 178
179 if (pairwise) 179 if (pairwise)
180 key = sta->ptk; 180 key = key_mtx_dereference(local, sta->ptk);
181 else 181 else
182 key = sta->gtk[key_idx]; 182 key = key_mtx_dereference(local, sta->gtk[key_idx]);
183 } else 183 } else
184 key = sdata->keys[key_idx]; 184 key = key_mtx_dereference(local, sdata->keys[key_idx]);
185 185
186 if (!key) { 186 if (!key) {
187 ret = -ENOENT; 187 ret = -ENOENT;
@@ -463,7 +463,7 @@ static int ieee80211_config_beacon(struct ieee80211_sub_if_data *sdata,
463 int size; 463 int size;
464 int err = -EINVAL; 464 int err = -EINVAL;
465 465
466 old = sdata->u.ap.beacon; 466 old = rtnl_dereference(sdata->u.ap.beacon);
467 467
468 /* head must not be zero-length */ 468 /* head must not be zero-length */
469 if (params->head && !params->head_len) 469 if (params->head && !params->head_len)
@@ -558,8 +558,7 @@ static int ieee80211_add_beacon(struct wiphy *wiphy, struct net_device *dev,
558 558
559 sdata = IEEE80211_DEV_TO_SUB_IF(dev); 559 sdata = IEEE80211_DEV_TO_SUB_IF(dev);
560 560
561 old = sdata->u.ap.beacon; 561 old = rtnl_dereference(sdata->u.ap.beacon);
562
563 if (old) 562 if (old)
564 return -EALREADY; 563 return -EALREADY;
565 564
@@ -574,8 +573,7 @@ static int ieee80211_set_beacon(struct wiphy *wiphy, struct net_device *dev,
574 573
575 sdata = IEEE80211_DEV_TO_SUB_IF(dev); 574 sdata = IEEE80211_DEV_TO_SUB_IF(dev);
576 575
577 old = sdata->u.ap.beacon; 576 old = rtnl_dereference(sdata->u.ap.beacon);
578
579 if (!old) 577 if (!old)
580 return -ENOENT; 578 return -ENOENT;
581 579
@@ -589,8 +587,7 @@ static int ieee80211_del_beacon(struct wiphy *wiphy, struct net_device *dev)
589 587
590 sdata = IEEE80211_DEV_TO_SUB_IF(dev); 588 sdata = IEEE80211_DEV_TO_SUB_IF(dev);
591 589
592 old = sdata->u.ap.beacon; 590 old = rtnl_dereference(sdata->u.ap.beacon);
593
594 if (!old) 591 if (!old)
595 return -ENOENT; 592 return -ENOENT;
596 593