Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 278978
b: refs/heads/master
c: 87be1e1
h: refs/heads/master
v: v3
  • Loading branch information
Johannes Berg authored and John W. Linville committed Dec 15, 2011
1 parent adc4db5 commit 097f484
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 92b62f28d02d3aafd824062f0ea57cc36fbc59d6
refs/heads/master: 87be1e1e00f870567780dec111193426b4c085e8
12 changes: 6 additions & 6 deletions trunk/net/mac80211/cfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -954,19 +954,19 @@ static int ieee80211_change_station(struct wiphy *wiphy,
struct sta_info *sta;
struct ieee80211_sub_if_data *vlansdata;

rcu_read_lock();
mutex_lock(&local->sta_mtx);

sta = sta_info_get_bss(sdata, mac);
if (!sta) {
rcu_read_unlock();
mutex_unlock(&local->sta_mtx);
return -ENOENT;
}

/* in station mode, supported rates are only valid with TDLS */
if (sdata->vif.type == NL80211_IFTYPE_STATION &&
params->supported_rates &&
!test_sta_flag(sta, WLAN_STA_TDLS_PEER)) {
rcu_read_unlock();
mutex_unlock(&local->sta_mtx);
return -EINVAL;
}

Expand All @@ -975,13 +975,13 @@ static int ieee80211_change_station(struct wiphy *wiphy,

if (vlansdata->vif.type != NL80211_IFTYPE_AP_VLAN &&
vlansdata->vif.type != NL80211_IFTYPE_AP) {
rcu_read_unlock();
mutex_unlock(&local->sta_mtx);
return -EINVAL;
}

if (params->vlan->ieee80211_ptr->use_4addr) {
if (vlansdata->u.vlan.sta) {
rcu_read_unlock();
mutex_unlock(&local->sta_mtx);
return -EBUSY;
}

Expand All @@ -997,7 +997,7 @@ static int ieee80211_change_station(struct wiphy *wiphy,
if (test_sta_flag(sta, WLAN_STA_TDLS_PEER) && params->supported_rates)
rate_control_rate_init(sta);

rcu_read_unlock();
mutex_unlock(&local->sta_mtx);

if (sdata->vif.type == NL80211_IFTYPE_STATION &&
params->sta_flags_mask & BIT(NL80211_STA_FLAG_AUTHORIZED))
Expand Down

0 comments on commit 097f484

Please sign in to comment.